First swap s and t to let s.size() < t.size(). Then check if they different of length is greater than 1. Then when meet the different char, if two strings has same size, increase they pointer to 1, else increase longer pointer to 1
leetcode-161-One Edit Distance
最新推荐文章于 2022-06-10 23:58:47 发布