题目链接:https://leetcode.com/problems/find-largest-value-in-each-tree-row/?tab=Description 题意:找每层的最大值。 直接dfs扔map里 ...
分类:
其他好文 时间:
2017-03-10 16:32:19
阅读次数:
218
Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed n ...
分类:
其他好文 时间:
2017-03-08 22:40:42
阅读次数:
176
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,?1,2,1 ...
分类:
其他好文 时间:
2017-03-07 12:54:25
阅读次数:
115
题目链接 对栈的一种灵活运用吧算是,希望我的注释写的足够清晰。。 ...
分类:
其他好文 时间:
2017-03-05 17:26:25
阅读次数:
166
本周学习分治法,故特意挑选了相关习题巩固一下,并回顾一下分治法的思路 题目:Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth large ...
分类:
其他好文 时间:
2017-03-05 14:20:43
阅读次数:
186
http://www.spoj.com/problems/MINSUB/en/ 题意:给出一个n*m的矩阵M,和一个面积k,要使得M的子矩阵M'的最小元素最大并且面积大于等于k,问子矩阵M'的最小元素最大能是多少,并且求出最大的面积。 思路:二分一个最小元素x,转化为判断矩阵M里面是否存在一个子矩阵 ...
分类:
其他好文 时间:
2017-03-04 18:39:51
阅读次数:
283
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 examp ...
分类:
其他好文 时间:
2017-03-01 23:27:35
阅读次数:
296
2017/3/1 215. Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted ...
分类:
其他好文 时间:
2017-03-01 22:59:41
阅读次数:
244
For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now i ...
分类:
其他好文 时间:
2017-02-28 15:37:19
阅读次数:
144
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],t ...
分类:
其他好文 时间:
2017-02-26 08:18:51
阅读次数:
185