leetcode难题汇总
文章平均质量分 84
Shawn_Redemption
这个作者很懒,什么都没留下…
展开
-
【Leetcode】Word Ladder II (Backtracking)
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: Only one letter can be changed at a timeEach intermediate word must exi原创 2014-11-14 01:34:00 · 568 阅读 · 0 评论 -
【Leetcode】Best Time to Buy and Sell Stock III (DP)
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 transactions. Note: You ma原创 2014-11-04 07:56:26 · 544 阅读 · 2 评论 -
【Leetcode】Maximal Rectangle (DP)
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.原创 2014-10-31 12:17:25 · 462 阅读 · 0 评论 -
【Leetcode】Regular Expression Matching (DP)
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input st原创 2014-11-02 02:17:28 · 445 阅读 · 0 评论