161. One Edit Distance

Given two strings s and t, determine if they are exactly one edit distance apart. An edit is:

  • Insert one character
  • Delete one character
  • Replace one character

Return true if s and t are exactly one edit apart, false otherwise. Strings that are already equal are not one edit apart.

Examples
Input: ["","a"]
Output: true
Hints
Related Problems

161. One Edit Distance

Given two strings `s` and `t`, determine if they are exactly one edit distance apart. An edit is: