Given two strings
sandgoal, returntrueif you can swap two letters insso the result is equal togoal, otherwise, returnfalse.Swapping letters is defined as taking two indices
iandj(0-indexed) such thati != jand swapping the characters ats[i]ands[j].
- For example, swapping at indices
0and2in"abcd"results in"cbad".