Leetcode 2531. Make Number of Distinct Characters Equal
Determine whether a single swap of one character from each of two lowercase strings can make their counts of distinct characters equal. The core challenge is to reason about how swapping a letter can introduce or remove unique letters from each string (over a fixed 26-letter alphabet) so the distinct-character totals match.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.