Dynamic Programming
文章平均质量分 93
Peng_maple
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[LeetCode] 44. Wildcard Matching
Wildcard MatchingGiven an input string (s) and a pattern §, implement wildcard pattern matching with support for ‘?’ and ‘*’.‘?’ Matches any single character.‘*’ Matches any sequence of characters...原创 2018-12-05 00:02:49 · 184 阅读 · 0 评论 -
[leetcode] 132.Palindrome Partitioning II
Palindrome Partitioning IIGiven a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.Example:Input:...原创 2019-08-16 19:22:14 · 227 阅读 · 0 评论 -
[leetcode] 115. Distinct Subsequences
Distinct SubsequencesGiven 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...原创 2019-08-10 10:09:09 · 174 阅读 · 0 评论 -
[leetcode] 97. Interleaving String
Interleaving StringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.Example 1:Input: s1 = “aabcc”, s2 = “dbbca”, s3 = “aadbbcbcac”Output: trueExample 2:Input: s1 =...原创 2019-08-01 20:02:54 · 257 阅读 · 0 评论 -
[leetcode] 221. Maximal Square && 85. Maximal Rectangle
Maximal SquareGiven a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.Example:Input:1 0 1 0 01 0 1 1 11 1 1 1 11 0 0 1 0Output: 4解法...原创 2019-07-28 13:18:36 · 317 阅读 · 0 评论 -
[leetcode] 87. Scramble String
Scramble StringGiven 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”:Given two str...原创 2019-07-31 19:03:07 · 157 阅读 · 0 评论 -
[LeetCode] 72. Edit Distance
Edit DistanceGiven 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:Insert a characterDel...原创 2019-07-21 11:46:51 · 143 阅读 · 0 评论 -
[LeetCode] 55. Jump Game
Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determi...原创 2019-04-01 15:17:54 · 201 阅读 · 0 评论 -
[LeetCode] 123. Best Time to Buy and Sell Stock III
Best Time to Buy and Sell Stock IIISay you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete at most two...原创 2019-04-06 15:59:46 · 184 阅读 · 0 评论 -
[LeetCode] 42. Trapping Rain Water
Trapping Rain WaterGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Example:Input: [0,1,0,2,1,...原创 2019-03-31 21:25:33 · 214 阅读 · 0 评论 -
[LeetCode] 3. Longest Substring Without Repeating Characters
Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.Example 1:Input: “abcabcbb”Output: 3Explanation: The answer is...原创 2019-03-24 15:43:04 · 192 阅读 · 0 评论 -
[LeetCode] 32. Longest Valid Parentheses
Longest Valid ParenthesesGiven a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.Example 1:Input: “(()”Output: 2Explan...原创 2019-03-28 21:24:10 · 237 阅读 · 0 评论 -
[LeetCode] 10. Regular Expression Matching
Regular Expression MatchingGiven an input string (s) and a pattern §, implement regular expression matching with support for ‘.’ and ‘*’.‘.’ Matches any single character.‘*’ Matches zero or more o...原创 2019-03-25 21:51:33 · 182 阅读 · 0 评论 -
[LeetCode] 5. Longest Palindromic Substring
Longest Palindromic SubstringGiven 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” i...原创 2018-12-02 00:10:10 · 179 阅读 · 0 评论 -
[leetcode] 139. Word Break
Word BreakGiven a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words.N...原创 2019-08-17 11:25:40 · 244 阅读 · 0 评论
分享