【题目】
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
【题意】
给定一个非负整数,这个表示为一个数字数组。计算这个整数加1后的值。
【思路】
从低位到高位依次相加,注意处理进...
分类:
其他好文 时间:
2014-06-05 01:24:44
阅读次数:
250
Given an array of non-negative integers, you
are initially positioned at the first index of the array.Each element in the
array represents your maximu...
分类:
其他好文 时间:
2014-06-04 20:44:19
阅读次数:
216
Given a non-negative number represented as an
array of digits, plus one to the number.The digits are stored such that the most
significant digit is at...
分类:
其他好文 时间:
2014-06-04 19:19:52
阅读次数:
185
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-06-04 19:15:23
阅读次数:
345
The gray code is a binary numeral system where
two successive values differ in only one bit.Given a non-negative
integernrepresenting the total number...
分类:
其他好文 时间:
2014-06-04 18:58:39
阅读次数:
277
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 ...
分类:
其他好文 时间:
2014-06-01 17:05:44
阅读次数:
296
【题目】
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 of each bar is 1, given height = [2,1,5,6,2,3].
The...
分类:
其他好文 时间:
2014-06-01 10:46:29
阅读次数:
242
【题目】
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.
...
分类:
其他好文 时间:
2014-06-01 09:16:29
阅读次数:
242
题目:Problem DescriptionGiven a two-dimensional
array of positive and negative integers, a sub-rectangle is any contiguous
sub-array of size 1 x 1 or gr...
分类:
其他好文 时间:
2014-05-31 11:35:43
阅读次数:
271
Jump Game IIGiven an array of non-negative
integers, you are initially positioned at the first index of the array.Each
element in the array represents...
分类:
其他好文 时间:
2014-05-31 03:14:14
阅读次数:
243