Daily Archives: June 4, 2015


[leetcode] Interleaving String

Interleaving String 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. //方案一,递归,超时。复杂度o(n+m) class Solution { public: bool isInterleave(string s1, string s2, string […]