Interleaving Of Two Strings

1. You are given three strings - s1, s2 and s3.
2. You have to find whether s3 is formed by interleaving of s1 and s2.
3. s3 is interleaving if it contains all characters of s1 and s2, and order of all characters in individual string is preserved.
Input Format
String s1
String s2
String s3
Output Format
true/false
Question Video
Constraints
1 <= s1.length() <= 100
1 <= s2.length() <= 100
1 <= s3.length() <= 200
Sample Input
aabcc
dbbca
aadbbcbcac
Sample Output
true


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name