Given a string, determine if it is an interleaving of two other given strings. How difficult is this problem? I suspect it is one that can be quickly solved via dynamic programming. There's something magical about being able to do quick tests on seemingly jumbled data.
What if there are N strings interleaved? Could be exponential in N.
No comments :
Post a Comment