Search
⌘K
Leetcode 87. Scramble String
Determine whether s2 can be obtained from s1 by recursively splitting s1 into two non-empty parts and optionally swapping the parts at each split (i.e., whether s2 is a "scramble" of s1). The core challenge is to explore all split positions and swap/no-swap combinations efficiently (often requiring recursion + memoization or DP with character-count pruning).
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.