Dynamic programming problems solution to interleaving strings
问题 I was trying to solve this problem, and I gave up, and found the solution below, although I do not understand how the solution works, or why it works. Any in-depth solution would be deeply appreciated. Question: Given s1 , s2 , s3 , find whether s3 is formed by the interleaving of s1 and s2 . For example, Given: s1 = "aabcc" s2 = "dbbca" When s3 = "aadbbcbcac" , return true. When s3 = "aadbbbaccc" , return false. Solution: public static boolean isInterleave(String s1, String s2, String s3) {