threeal / leetspace

A dedicated workspace and archive for my LeetCode submissions
https://leetcode.com/threeal
MIT License
1 stars 1 forks source link

Solve Problem 859. Buddy Strings #1372

Open threeal opened 1 month ago

threeal commented 1 month ago

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.