Trapping Rain Water IIGivennxmnon-negative integers representing an elevation map 2d where the area of each cell is1x1, compute how much water it is a...
分类:
移动开发 时间:
2015-08-19 23:43:44
阅读次数:
500
Dwarves, Elves, Wizards, and KingsEvan Cofskyin nEAl STEpHEnSon’S novEl CryptonomiCon (EoS), Randy Water- house explains his classification system for the different types of people he meets. Dwarves ar...
分类:
其他好文 时间:
2015-08-17 10:14:14
阅读次数:
133
本文转载自http://blog.csdn.net/shuangde800/article/details/11273123题意你有k个一模一样的水球,在一个n层楼的建筑物上进行测试,你想知道水球最低从几层楼往下丢可以让水球破掉。由于你很懒,所以你想要丢最少次水球来测出水球刚好破掉的最低楼层。(在最...
分类:
其他好文 时间:
2015-08-15 18:14:23
阅读次数:
165
题目:最大的盛水容器Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fi...
分类:
其他好文 时间:
2015-08-13 18:00:02
阅读次数:
103
问题描述给定一个二维矩阵,每个元素都有一个正整数值,表示高度。这样构成了一个二维的、有高度的物体。请问该矩阵可以盛放多少水?相关题目:POJ The Wedding JuicerDescriptionFarmer John’s cows have taken a side job designing interesting punch-bowl designs. The designs are cr...
分类:
移动开发 时间:
2015-08-09 12:34:24
阅读次数:
143
思路:最大面积等于两条垂直线中较小的一条乘以与x轴相交的长度,可以使用Two Pointers,一个从数组头开始(记为i),一个从数组尾部开始(记为j),当i result) result = tmp; if (height[i] < heigh...
分类:
其他好文 时间:
2015-08-08 17:53:00
阅读次数:
93
题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints ...
分类:
其他好文 时间:
2015-08-06 11:06:23
阅读次数:
81
https://leetcode.com/problems/container-with-most-water/题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai...
分类:
其他好文 时间:
2015-08-06 01:54:09
阅读次数:
140
Problem DescriptionXYZ is playing an interesting game called "drops". It is played on ar?cgrid. Each grid cell is either empty, or occupied by a water...
分类:
其他好文 时间:
2015-08-04 22:41:50
阅读次数:
121
Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent ...
分类:
其他好文 时间:
2015-08-03 22:19:33
阅读次数:
113