![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DP动态规划
CristianoJason
宏愿纵未了,奋斗总不太晚。
展开
-
[LeetCode]Maximal Rectangle寻找最大矩形
一、 题目描述:Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.For example, given the following matrix:1 0 1 0 01 0 1 1 11 1原创 2016-09-05 00:32:14 · 2444 阅读 · 0 评论 -
[LeetCode]Buy and Sell Stocks 买卖股票问题
LeetCode上关于买卖股票的问题一共有五道,题号分别为121,122,123,188,309。此类问题的基本描述即给出一个序列prices[],prices[i]代表第i天股票的价格。如果当天之前不持有股票,则可以以prices[i]的价格购入股票;如果当天之前持有股票,则可以以prices[i]的价格卖出股票;当然,当天也可任何操作都不进行。目的就是求该阶段的最大收益。原创 2016-09-10 15:22:33 · 4217 阅读 · 0 评论 -
[LeetCode]Majority Element(献上膝盖的一题)
一、问题描述:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the原创 2016-09-06 14:45:52 · 480 阅读 · 0 评论