Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Interleaving String
Hard
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Determine if string s3 is formed by interleaving s1 and s2.
Sample Input:
"aabcc", "dbbca", "aadbbcbcac"
Sample Output:
true
Hints
Hint 1
Use dynamic programming
Hint 2
DP[i][j] = can form s3[0:i+j] from s1[0:i] and s2[0:j]
Hint 3
Check characters from both strings
Code Editor
Reset
Run
Save
Loading...