Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2839. Check if Strings Can be Made Equal With Operations I
Given two length-4 strings where the only allowed operation is swapping characters at indices that differ by 2 (i.e., 0↔2 or 1↔3), determine whether s1 can be transformed into s2. This reduces to checking that the multisets of characters at even indices and at odd indices are the same in both strings.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.