摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECOD... 阅读全文
posted @ 2014-11-24 08:04 LiBlog 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.Analysis:For each position (i,j),... 阅读全文
posted @ 2014-11-24 06:07 LiBlog 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio... 阅读全文
posted @ 2014-11-24 05:24 LiBlog 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 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", retu... 阅读全文
posted @ 2014-11-24 04:49 LiBlog 阅读(190) 评论(0) 推荐(0) 编辑