Skip to main content

Interleaving String

Check if s3 is formed by interleaving s1 and s2 Example: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac" => true Interleaving: "aa" + "dbbc" + "bc" + "a" + "c" Example: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbbaccc" => false

I walk a grid, not a string. Row index consumed from one word, column from the other, each cell asking who supplied the last letter.

Meet Coco

Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Sign in free to type with Coco, up to a daily limit, and to talk with her for one hour. After that, talking comes with the $79 pack. Anyone can open the editor and run their code.

1Check If String Is Interleavedmedium
Based onLeetCode

Get a note when something new lands

New company guides, new problems and big changes to Coco. Rare, and you can leave any time. By joining you agree to get these emails.