L179:Largest Number
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 number is 9534330. Note: Th...
分类:
其他好文 时间:
2015-06-17 21:37:46
阅读次数:
102
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 matr...
分类:
其他好文 时间:
2015-06-17 08:13:14
阅读次数:
112
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 num...
分类:
其他好文 时间:
2015-06-17 07:08:55
阅读次数:
97
Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl...
分类:
其他好文 时间:
2015-06-16 14:43:22
阅读次数:
161
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 matr...
分类:
编程语言 时间:
2015-06-15 18:34:55
阅读次数:
1218
Find the ith largest item in an array
分类:
其他好文 时间:
2015-06-15 10:54:59
阅读次数:
110
原题
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 histogram.
Above is a histogram where...
分类:
其他好文 时间:
2015-06-14 18:36:43
阅读次数:
102
【重要的事情写在前面】先来说说swap的实现方式,这道题我本来自己写了个swap的算法,除了通常的swap(type& a, type& b){ type t = a; a = b; b = a;}的写法外,还有一种【极客】写法:swap(type& a, type& b){ a ^= b;...
分类:
其他好文 时间:
2015-06-14 15:06:14
阅读次数:
131
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 ...
分类:
其他好文 时间:
2015-06-14 13:50:36
阅读次数:
91
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 example,
Given[3,2,1,5,6,4]and k = 2, return 5.Note:...
分类:
其他好文 时间:
2015-06-14 09:34:25
阅读次数:
120