Challenge: Strings Interleaving
Given three strings
p, write a function to find out if
p has been formed by interleaving
p should be considered to be an interleaved form of
n, if it contains all the letters from
n in a preserved order.
m = "abd"
n = "cef"
p = "abcdef"
result = True
First, take a close look at this problem and design a step-by-step algorithm before jumping to the implementation. This problem is designed for your practice, so try to solve it on your own first. If you get stuck, you can always refer to the solution provided in the solution section. Good luck!