Search
⌘K

Leetcode 97. Interleaving String

Check whether s3 can be formed by merging s1 and s2 while preserving the relative order of characters from each string (their lengths must sum to s3.length). This is typically solved with dynamic programming over prefixes (with a space-optimized 1D variant for the follow-up).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.