题目描述:The gray code is a binary numeral system
where two successive values differ in only one bit.Given a non-negative
integernrepresenting the total n...
分类:
其他好文 时间:
2014-05-26 21:30:04
阅读次数:
296
Given a list, rotate the list to the right
bykplaces, wherekis non-negative.For
example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.思路:这道...
分类:
其他好文 时间:
2014-05-26 00:06:39
阅读次数:
250
缓存(caching): 当组合结构很复杂,或者遍历的代价太高,那么实现组合节点的缓存就很有帮助。
(1) Java Collection Framework 指的是一群类的接口。 其中包括了 ArrayList, Vector , LinkedList , Stack ,和 PriorityQueue. 这些类都实现了java.util.Collection接口。
(2) Collect...
分类:
其他好文 时间:
2014-05-24 23:37:45
阅读次数:
432
【题目】
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 maximum jump length at that position.
Determine if you are able to reach the last index.
For example:...
分类:
其他好文 时间:
2014-05-24 20:44:39
阅读次数:
221
【题目】
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Given a collection of intervals, merge all overlapping intervals.
For example,
Given [1,3],[2,6],[8,10],[15,18],
return [1,6],[8,10],[15,18].
...
分类:
其他好文 时间:
2014-05-24 14:18:27
阅读次数:
193
Given n non-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....
分类:
移动开发 时间:
2014-05-23 03:59:43
阅读次数:
364
【题目】
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 maximum jump length at that position.
Your goal is to reach the last index in the minimum number of ju...
分类:
其他好文 时间:
2014-05-22 17:02:20
阅读次数:
244
【题目】
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
【题意】
给定用字符串表示的整数,返回两个数的乘积结果字符串。两个数字都非负,且能任意大。
【思路】
1. 考虑其中一个数是0的情况
2. 模拟乘法运算...
分类:
其他好文 时间:
2014-05-21 13:45:37
阅读次数:
214
1、
??
Add Two Numbers
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 num...
分类:
其他好文 时间:
2014-05-21 10:49:10
阅读次数:
221
【题目】
Given n non-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.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
The above elevation map is represente...
分类:
移动开发 时间:
2014-05-21 06:44:38
阅读次数:
359