Dynamic Programming
QihaoD
留个言吧,会很开心的,哈哈
展开
-
[leetCode] Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest原创 2014-12-28 07:55:42 · 379 阅读 · 0 评论 -
[leetCode] Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.public class Solution { public int maximalRectangle(char[][] matrix) {原创 2015-05-17 01:31:06 · 387 阅读 · 0 评论 -
[leetCode] Maximal Square
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matrix:1 0 1 0 01 0 1 1 11 1 1 1 11 0 0 1 0原创 2015-07-04 02:03:04 · 349 阅读 · 0 评论 -
[leetCode] Different Ways to Add Parentheses
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.Example 1原创 2015-08-04 02:15:01 · 582 阅读 · 0 评论 -
[leetCode] House Robber
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent house原创 2015-08-22 00:31:10 · 296 阅读 · 0 评论