LeetCode 1790. Check if One String Swap Can Make Strings Equal
Input: s1 = "bank", s2 = "kanb"
Output: true
Explanation: For example, swap the first character with the last character of s2 to make "bank".Input: s1 = "attack", s2 = "defend"
Output: false
Explanation: It is impossible to make them equal with one string swap.Input: s1 = "kelb", s2 = "kelb"
Output: true
Explanation: The two strings are already equal, so no string swap operation is required.Input: s1 = "abcd", s2 = "dcba"
Output: falseSolution
PreviousLeetCode 1788. Maximize the Beauty of the GardenNextLeetCode 1791. Find Center of Star Graph
Last updated