随笔分类 -  dp - string match

718. Maximum Length of Repeated Subarray
摘要:Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Since a common subarray of A and B 阅读全文

posted @ 2018-11-30 08:15 猪猪🐷

161. One Edit Distance
摘要:Given two strings s and t, determine if they are both one edit distance apart. Note: There are 3 possiblities to satisify one edit distance apart: Insert a character into s to get t Delete a char... 阅读全文

posted @ 2018-11-09 07:22 猪猪🐷

72. Edit Distance
摘要:Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitted on a word: 1. Insert a character 2. Delete a c... 阅读全文

posted @ 2018-11-06 08:03 猪猪🐷

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 deleting some (c... 阅读全文

posted @ 2018-11-06 08:02 猪猪🐷

727. Minimum Window Subsequence
摘要:Given strings S and T, find the minimum (contiguous) substring W of S, so that T is a subsequence of W. If there is no such window in S that covers all characters in T, return the empty string "". If... 阅读全文

posted @ 2018-11-06 08:01 猪猪🐷

5. Longest Palindromic Substring
摘要:Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Example... 阅读全文

posted @ 2018-11-06 08:00 猪猪🐷

647. Palindromic Substrings
摘要:Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文

posted @ 2018-08-28 20:08 猪猪🐷

647. Palindromic Substrings
摘要:Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文

posted @ 2018-08-10 15:32 猪猪🐷

10. Regular Expression Matching
摘要:Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. The matching should cover the entire  阅读全文

posted @ 2018-08-10 14:52 猪猪🐷

44 Wildcard Matching
摘要:Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*'. The matching should cover the entire in 阅读全文

posted @ 2018-08-10 14:51 猪猪🐷

导航