Given two strings consisting of lowercase english alphabets, the task is to check whether these strings are meta strings or not. Meta strings are the strings which can be made equal by exactly one swap in any of the strings. Equal string are not considered here as Meta strings.
- Time : O(n)
- Space : O(1)
1 | bool metaStrings (string S1, string S2) |