码迷,mamicode.com
首页 >  
搜索关键字:largest    ( 1413个结果
PAT 1094. The Largest Generation(BFS)
CODE: #include #include #include using namespace std; bool mat[105][105]; bool root[105]; int n,m; int R; int cnt[105]; int ans1,ans2; struct TNode { int num; int level; }; void BFS() { ...
分类:其他好文   时间:2015-07-21 12:51:41    阅读次数:128
[LeetCode][Java] 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 wi...
分类:编程语言   时间:2015-07-19 13:35:37    阅读次数:128
[CareerCup] 2.2 Kth to Last Element of Linked List 链表的倒数第k个元素
2.2 Implement an algorithm to find the kth to last element of a singly linked list.这道题让我们求链表中倒数第k个元素,LeetCode中相类似的题目有Kth Largest Element in an Array 数...
分类:其他好文   时间:2015-07-19 13:21:05    阅读次数:104
Codeforces Round #277.5 (Div. 2)——C贪心—— Given Length and Sum of Digits
You have a positive integermand a non-negative integers. Your task is to find the smallest and the largest of the numbers that have lengthmand sum of ...
分类:其他好文   时间:2015-07-16 21:59:17    阅读次数:144
[leedcode 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.public class Solution { public...
分类:其他好文   时间:2015-07-15 22:39:04    阅读次数:270
[leedcode 84] Largest Rectangle in Histogram
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
分类:其他好文   时间:2015-07-15 20:55:22    阅读次数:105
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 ...
分类:其他好文   时间:2015-07-15 12:33:46    阅读次数:92
codeforce 124B——全排列dfs——Permutations
You are givennk-digit integers. You have to rearrange the digits in the integers so that the difference between the largest and the smallest number wa...
分类:其他好文   时间:2015-07-15 01:17:15    阅读次数:244
POJ 2559 Largest Rectangle in a Histogram(单调栈)
【题目链接】:click here~~ 【题目大意】: A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For exampl...
分类:其他好文   时间:2015-07-14 22:38:58    阅读次数:276
最小堆及其操作函数
前几天在做Kth Largest Element in an Array 时使用到了堆,通过那倒题目也了解到了堆的make_heap,push_heap,pop_heap操作,看了C++ reference中的讲解也明白了heap_sort是什么回事。于是想着自己实现以下这四个函数。 堆的定义: 任意节点小于它的所有后裔,最小元在堆的根上(堆序性)。 堆总是一棵完全树。 #include <ios...
分类:其他好文   时间:2015-07-14 18:16:02    阅读次数:109
1413条   上一页 1 ... 83 84 85 86 87 ... 142 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!