字符串匹配
帘外雨
学生一枚
展开
-
Leetcode 72. Edit Distance
问题描述 Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted o原创 2017-07-11 22:05:31 · 192 阅读 · 0 评论 -
Leetcode 32. Longest Valid Parentheses
问题描述 Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring is "原创 2017-07-11 16:36:51 · 210 阅读 · 0 评论 -
Leetcode 87. Scramble String
问题描述 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 representation of s1 = "great": great /原创 2017-07-12 10:57:44 · 237 阅读 · 0 评论 -
Leetcode 97. 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", r原创 2017-07-12 16:11:09 · 253 阅读 · 0 评论 -
Leetcode 115. Distinct Subsequences
问题描述 Given a string S and a string T, count the number of distinct subsequences of S which equals T.A subsequence of a string is a new string which is formed from the original string by deleti原创 2017-07-12 16:59:14 · 197 阅读 · 0 评论