← All problemsSign in

Chef and Shuffle Strings

Chef has three strings: A, B, and C. String C is said to be a shuffle of A and B if it can be formed by interleaving the characters of A and B in a way that maintains the left to right ordering of the characters from each string. For example, given A="pqr" and B="xyz", C="xpqyrz" is a valid shuffle since the character ordering of the two strings is preserved. Help Chef to detect whether C is a

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start