Similar Restaurant Names Within k Swaps
Asked at DoorDash · Coding Questions · Difficulty: Hard · Last asked Mar 13, 2026
Two restaurant names count as **similar** when the first can be turned into the second with at most `k` swaps, where one swap exchanges the characters at any two positions (not only neighbouring ones). Given two names and `k`, decide whether they are similar.
Loading the problem…