Amazon | Onsite | K-Similar Strings
Anonymous User
2649

https://leetcode.com/problems/k-similar-strings/
There are two anagram strings, what is the minimum number of swaps required to match one string to another? You can swap any 2 characters. What is time complexity?

Example 1:

Input: s1 = "AABC", s2 = "AACB"
Output: 1
Explanation: swap 'B' and 'C' AABC => AACB
Comments (3)