2015年10月8日

84. Largest Rectangle in Histogram (Array, Stack; DP)

摘要: Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist 阅读全文

posted @ 2015-10-08 20:16 joannae 阅读(191) 评论(0) 推荐(0) 编辑

85. Maximal Rectangle (Graph; Stack, DP)

摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.思路:例如0110111010011101111011111000... 阅读全文

posted @ 2015-10-08 16:15 joannae 阅读(244) 评论(0) 推荐(0) 编辑

134. Gas Station (Array; DP)

摘要: There 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 cost 阅读全文

posted @ 2015-10-08 15:49 joannae 阅读(165) 评论(0) 推荐(0) 编辑

导航