One Edit Distance
Given two stringss andt, determine if they are both one edit distance apart.
Note:
There are 3 possiblities to satisify one edit distance apart:
Insert a character into s to get t
Delete a character from s to get t
Replace a character of s to get t
Example 1:
Example 2:
Example 3:
Solution
Last updated