题目: 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 follo ...
分类:
编程语言 时间:
2017-12-16 21:16:37
阅读次数:
210
题目: 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 ...
分类:
编程语言 时间:
2017-12-16 20:36:15
阅读次数:
155
A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Ea ...
分类:
其他好文 时间:
2017-12-14 14:50:52
阅读次数:
215
[抄题]: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4 ...
分类:
编程语言 时间:
2017-12-10 11:26:45
阅读次数:
169
Query on a tree III You are given a node labeled rooted tree with n nodes. Define the query (x, k): Find the node whose label is k th largest in the s ...
分类:
其他好文 时间:
2017-12-02 19:18:26
阅读次数:
184
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For exam ...
分类:
其他好文 时间:
2017-12-02 11:24:39
阅读次数:
92
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. For example, given the following ma ...
分类:
其他好文 时间:
2017-12-02 11:13:43
阅读次数:
174
标签: ACM 题目: Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some ...
分类:
其他好文 时间:
2017-11-30 20:13:21
阅读次数:
197
You need to find the largest value in each row of a binary tree. Example: 算法: 1.BFS。层级遍历,每层打擂台。 2.DFS。记录从上到下的深度,每层参数里传下去+1即可。(从下到上的深度是通过回传int返回值来递归实现的 ...
分类:
其他好文 时间:
2017-11-29 16:16:53
阅读次数:
138
'''You need to find the largest value in each row of a binary tree.Example:Input: 1 / \ 3 2 / \ \ 5 3 9Output: [1, 3, 9]'''# Definition for a binary t... ...
分类:
编程语言 时间:
2017-11-27 20:05:52
阅读次数:
188