This issue suggests solving the problem 859. Buddy Strings. To determine if a string is a buddy of another string, one can check if there are exactly 2 differences with the same letters, or if both strings are equal and there are duplicated characters.
This issue suggests solving the problem 859. Buddy Strings. To determine if a string is a buddy of another string, one can check if there are exactly 2 differences with the same letters, or if both strings are equal and there are duplicated characters.