Try all ways to pick characters alternately from s1 and s2 to form s3.
At each position in s3, you choose from s1 or s2. With lengths and , there are ways.
Checking each is exponential. Can you reuse partial solutions?
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Why brute force fails
Try all ways to pick characters alternately from s1 and s2 to form s3.
At each position in s3, you choose from s1 or s2. With lengths and , there are ways.
Checking each is exponential. Can you reuse partial solutions?