Leetcode 161. One Edit Distance (math)