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). Find ...
分类:
其他好文 时间:
2014-12-17 14:45:13
阅读次数:
141
Description
You are given two positive integers A and B in Base C. For the equation:
A=k*B+d
We know there always existing many non-negative pairs (k, d) that satisfy the equation above. Now...
分类:
其他好文 时间:
2014-12-16 21:05:09
阅读次数:
244
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 hist...
分类:
其他好文 时间:
2014-12-16 08:40:59
阅读次数:
224
Trapping Rain WaterGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to tr...
分类:
移动开发 时间:
2014-12-15 15:03:44
阅读次数:
184
Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of convertin...
分类:
其他好文 时间:
2014-12-15 09:03:15
阅读次数:
154
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-12-14 17:07:20
阅读次数:
357
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...
分类:
其他好文 时间:
2014-12-12 22:09:45
阅读次数:
191
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-12-12 15:01:52
阅读次数:
137
Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Fo...
分类:
移动开发 时间:
2014-12-11 20:46:47
阅读次数:
232
题目描述:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a si...
分类:
其他好文 时间:
2014-12-11 15:35:50
阅读次数:
124