Search⌘ K
AI Features

Check if One String Swap Can Make Strings Equal

Check if One String Swap Can Make Strings Equal asks whether two equal-length strings can become identical after at most one swap in either string, including no swap. Return true or false.

Statement

You are given two strings s1 and s2 of equal length. A ...