![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode python
clearsunshinel
想要一个offer
展开
-
leetcode python word-break
第一篇博客word-break题意思路python实现word-breakGiven a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, gi...原创 2019-06-06 20:24:12 · 167 阅读 · 0 评论 -
leetcode python unique-paths(包含12)
机器人走路二题unique-paths(后面还有ii)题意思路python实现unique-paths-ii题意思路python实现unique-paths(后面还有ii)A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can o...原创 2019-06-11 15:55:17 · 125 阅读 · 0 评论 -
leetcode python Edit Distance
三点半Minimum Path Sum题意思路python实现Minimum Path SumGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizesthe sum of all numbers along its path.N...原创 2019-06-11 15:42:22 · 121 阅读 · 0 评论 -
leetcode python Minimum Path Sum
慌慌的Edit Distance题意思路python实现Edit DistanceGiven two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation iscounted as 1 step.)You have the fol...原创 2019-06-11 15:09:58 · 102 阅读 · 0 评论 -
leetcode python minimum-window-substring
准备次饭minimum-window-substring题意思路python实现minimum-window-substringGiven 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 examp...原创 2019-06-11 11:46:26 · 177 阅读 · 0 评论 -
leetcode python decode-ways
刚开完会decode-ways题意思路python实现decode-waysA message containing letters from A-Z is being encoded to numbers using the following mapping:‘A’ -> 1‘B’ -> 2…‘Z’ -> 26Given an encoded message c...原创 2019-06-11 10:18:09 · 102 阅读 · 0 评论 -
leetcode python interleaving-string
准备下班interleaving-string题意思路python实现interleaving-stringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 =“aabcc”,s2 =“dbbca”,When s3 = “aadbbcbca...原创 2019-06-10 20:34:15 · 160 阅读 · 0 评论 -
leetcode python best-time-to-buy-and-sell-stock(包含123)
股票三题best-time-to-buy-and-sell-stock(后面还有ii和iii)题意思路python实现best-time-to-buy-and-sell-stock ii题意思路python实现best-time-to-buy-and-sell-stock iii题意思路python实现best-time-to-buy-and-sell-stock(后面还有ii和iii)Say...原创 2019-06-10 16:10:21 · 175 阅读 · 0 评论 -
leetcode python palindrome-partitioning-ii
心有困扰palindrome-partitioning-ii题意思路python实现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 pal...原创 2019-06-10 14:59:49 · 145 阅读 · 0 评论 -
leetcode python Gas Station
注意效率Gas Station题意思路python实现Gas StationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costscost[i] o...原创 2019-06-10 14:27:15 · 154 阅读 · 0 评论 -
leetcode python candy
按时睡觉candy题意思路暴力dfs python实现candyThere are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each...原创 2019-06-10 11:39:31 · 178 阅读 · 0 评论 -
leetcode python word-break-ii
第一篇博客word-break-ii题意思路暴力dfs python实现dp+dfs python实现word-break-iiGiven a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.R...原创 2019-06-10 10:36:24 · 170 阅读 · 2 评论 -
leetcode python maximum-subarray
加油Maximum-subarray题意思路python实现Maximum-subarray题意在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决。但是,如果向量中包含负数,是否应该包含某个负数,并期望旁边的正数会弥补它呢?例如:{6,-3,-2,7,-15,1,2,2},连续子向量的最大和为8(从第0个开始,到第3个为止)。思路必须要有变量记...原创 2019-06-11 16:07:44 · 138 阅读 · 0 评论