码迷,mamicode.com
首页 >  
搜索关键字:largest    ( 1413个结果
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 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 Return ...
分类:其他好文   时间:2015-07-27 19:12:53    阅读次数:106
UVA10780 Again Prime? No time.
Again Prime? No time.The problem statement is very easy. Given a number n you have to determine the largest power of m,not necessarily prime...
分类:其他好文   时间:2015-07-27 10:40:18    阅读次数:92
[LeetCode] Kth Largest Element in an Array
https://leetcode.com/problems/kth-largest-element-in-an-array/ Find the kth largest element in an unsorted array. Note that it is the kth largest elem...
分类:其他好文   时间:2015-07-25 18:15:37    阅读次数:100
[Leetcode]Largest Rectangle in Histogram
//用栈实现 class Solution { public:     int largestRectangleArea(vector& height) {     stack index;     vector high=height;     int result=0;     int temp;     high.push_back(0);     for(int i=0;...
分类:其他好文   时间:2015-07-25 07:10:35    阅读次数:98
1054. The Dominant Color (20)
题目如下: Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is...
分类:其他好文   时间:2015-07-23 13:54:51    阅读次数:96
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 matr...
分类:其他好文   时间:2015-07-23 13:40:49    阅读次数:95
[Leetcode]-Maximum Subarray
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,?5,4], the contiguous subarray [4,?1,2,1] has the...
分类:其他好文   时间:2015-07-22 20:58:27    阅读次数:127
leetCode 84.Largest Rectangle in Histogram (最大矩形直方图) 解题思路和方法
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 width o...
分类:其他好文   时间:2015-07-22 14:40:08    阅读次数:95
leetCode 85.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. 思路:此题的意思是给一个为0或1的矩阵,求全部为1组成的最大矩阵的面积。 此题可以巧妙转化为求最大直方图面积的问题。 public class S...
分类:其他好文   时间:2015-07-22 14:37:08    阅读次数:98
[leedcode 152] 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...
分类:其他好文   时间:2015-07-21 20:12:55    阅读次数:97
1413条   上一页 1 ... 82 83 84 85 86 ... 142 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!