The strings s1 and s2 have equal length. You may swap two character positions in exactly one of the strings, at most once. The chosen positions may be the same, and you may also perform no swap. Return true if the strings can become equal, or false otherwise.
Example 1:
Input: s1 = "abcd"
s2 = "abdc"
Output: trueExplanation: Swap the characters at indices 2 and 3 in abcd to obtain abdc.
Example 2:
Input: s1 = "abc"
s2 = "abd"
Output: falseExplanation: The strings differ at one position. A swap only reorders existing characters, and abc has no d, so equality is impossible.
Example 3:
Input: s1 = "hello"
s2 = "hello"
Output: trueExplanation: The strings are already equal. Performing no swap is allowed.
Constraints:
1 <= s1.length, s2.length <= 100s1.length == s2.length- Both strings contain only lowercase English letters.