[leetcode] One Edit Distance
One Edit Distance Given two strings S and T, determine if they are both one edit distance apart. two pointers. class Solution { public: bool isOneEditDistance(string s, string t) { int ls = s.size(); int lt = t.size(); if(abs(ls – lt) > 1) return false; int i = 0, j […]