Loading...
You are given two strings s0 and s1 consisting of lowercase English letters.
s0
s1
An edit is one of the following:
Return true if s0 can be turned into s1 using at most one edit, and false otherwise. Equal strings need zero edits, so they count as within one edit.
true
false
Input: s0 = "abc", s1 = "adc" Output: true Explanation: Replacing 'b' with 'd' turns "abc" into "adc".
Input: s0 = "abc", s1 = "abcd" Output: true Explanation: Inserting 'd' at the end turns "abc" into "abcd".
Input: s0 = "abc", s1 = "axcd" Output: false Explanation: Turning "abc" into "axcd" needs at least two edits.
s0.length
s1.length