【题目】
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of the nodes ...
分类:
其他好文 时间:
2014-12-12 11:44:41
阅读次数:
125
【题目】
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not con...
分类:
其他好文 时间:
2014-12-10 12:38:33
阅读次数:
196
唉 谷歌出的神题,差点爆零了。。。三小时终于A掉 B题题目大概是说从左上角的点出发,经过某路线最后回到原点,求每个格子被路线包含的圈数的平方和。首先可以知道,对于某个格子来说,从该格子的任意一个方向划一条射线,路径穿过该射线的次数就等于该格子被包含的圈数(正穿和反穿抵消)。然后开一个100w的数组保...
分类:
其他好文 时间:
2014-12-10 00:20:25
阅读次数:
240
Minimum Adjustment CostGiven an integer array, adjust each integers so that the difference of every adjcent integers are not greater than a given numb...
分类:
其他好文 时间:
2014-12-09 19:18:19
阅读次数:
363
原题地址:https://oj.leetcode.com/problems/jump-game-ii/题目内容:Given an array of non-negative integers, you are initially positioned at the first index of th...
分类:
其他好文 时间:
2014-12-09 19:10:31
阅读次数:
159
【题目】
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.
Y...
分类:
其他好文 时间:
2014-12-09 17:46:14
阅读次数:
133
今日leetcode链表题全制霸原题地址:https://oj.leetcode.com/problems/sort-list/题目内容:Sort ListSort a linked list inO(nlogn) time using constant space complexity.方法:题目...
分类:
其他好文 时间:
2014-12-09 17:19:38
阅读次数:
162
【题目】
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.
D...
分类:
其他好文 时间:
2014-12-09 10:37:18
阅读次数:
114
一.原题中文大意。1 2 34 5 6 7 89 10 11 1213 14 15 1617 1819 20 21 22 23 2425 2627 28 29 30 31 3233 3435 36 37 38 39 4041 4243 44 45 46 47 4849 5051 52 53 54 5...
分类:
其他好文 时间:
2014-12-08 21:09:31
阅读次数:
666
题目地址:https://oj.leetcode.com/problems/intersection-of-two-linked-lists/题目内容:Write a program to find the node at which the intersection of two singly l...
分类:
其他好文 时间:
2014-12-08 19:22:13
阅读次数:
184