![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Dynamic Programming
文章平均质量分 94
Peng_maple
这个作者很懒,什么都没留下…
展开
-
[LeetCode] 44. Wildcard Matching
Wildcard Matching Given 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 · 125 阅读 · 0 评论 -
[leetcode] 132.Palindrome Partitioning II
Palindrome Partitioning II Given 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 · 154 阅读 · 0 评论 -
[leetcode] 115. Distinct Subsequences
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...原创 2019-08-10 10:09:09 · 110 阅读 · 0 评论 -
[leetcode] 97. Interleaving String
Interleaving String Given 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: true Example 2: Input: s1 =...原创 2019-08-01 20:02:54 · 177 阅读 · 0 评论 -
[leetcode] 221. Maximal Square && 85. Maximal Rectangle
Maximal Square Given 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 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 Output: 4 解法...原创 2019-07-28 13:18:36 · 221 阅读 · 0 评论 -
[leetcode] 87. Scramble String
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”: Given two str...原创 2019-07-31 19:03:07 · 109 阅读 · 0 评论 -
[LeetCode] 72. Edit Distance
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: Insert a character Del...原创 2019-07-21 11:46:51 · 90 阅读 · 0 评论 -
[LeetCode] 55. Jump Game
Jump Game Given 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 · 148 阅读 · 0 评论 -
[LeetCode] 123. Best Time to Buy and Sell Stock III
Best Time to Buy and Sell Stock III Say 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 · 132 阅读 · 0 评论 -
[LeetCode] 42. Trapping Rain Water
Trapping Rain Water Given 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 · 163 阅读 · 0 评论 -
[LeetCode] 3. Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. Example 1: Input: “abcabcbb” Output: 3 Explanation: The answer is...原创 2019-03-24 15:43:04 · 137 阅读 · 0 评论 -
[LeetCode] 32. Longest Valid Parentheses
Longest Valid Parentheses Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring. Example 1: Input: “(()” Output: 2 Explan...原创 2019-03-28 21:24:10 · 150 阅读 · 0 评论 -
[LeetCode] 10. Regular Expression Matching
Regular Expression Matching Given 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 · 125 阅读 · 0 评论 -
[LeetCode] 5. Longest Palindromic Substring
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” i...原创 2018-12-02 00:10:10 · 112 阅读 · 0 评论 -
[leetcode] 139. Word Break
Word Break Given 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 · 153 阅读 · 0 评论