s
and t
. If it's more than 1, return false
.s
is the shorter string. If not, swap s
and t
.t
is longer, check if the substring of s
from the current index is identical to the substring of t
from the next index.t
is one character longer than s
.true
if one edit distance is confirmed, otherwise return false
.