Link:http://oj.leetcode.com/problems/reverse-nodes-in-k-group/Given a linked
list, reverse the nodes of a linked listkat a time and return its modifie...
分类:
其他好文 时间:
2014-05-05 22:46:42
阅读次数:
456
Link:http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list,
swap every two adjacent nodes and return its head.For example,Given1->2-...
分类:
其他好文 时间:
2014-05-05 22:45:37
阅读次数:
331
Link:http://oj.leetcode.com/problems/balanced-binary-tree/Given a binary tree,
determine if it is height-balanced.For this problem, a height-balanced ...
分类:
其他好文 时间:
2014-05-05 22:29:55
阅读次数:
382
Problem Description
Given an positive integer A (1
For example, given A = 26, we can write A in binary form as 11010, so the lowest bit of A is 10, so the output should be 2.
Another example...
分类:
其他好文 时间:
2014-05-05 13:22:39
阅读次数:
394
题目:
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new len...
分类:
其他好文 时间:
2014-05-05 12:58:57
阅读次数:
294
Input
t – the number of numbers in list, then t lines follow [t
Each line contains one integer: N [0 N
Output
Output given numbers in non decreasing order.
Example
Input:
5
5
3
...
分类:
其他好文 时间:
2014-05-04 00:04:09
阅读次数:
376
Vitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets
so as the following conditions hold:
The product of all numbers in the first set is less ...
分类:
其他好文 时间:
2014-05-03 23:51:19
阅读次数:
621
Say you have an array for which theithelement
is the price of a given stock on dayi.Design an algorithm to find the maximum
profit. You may complete a...
分类:
其他好文 时间:
2014-05-03 23:21:20
阅读次数:
292
【题目】
B
Age Sort
Input: Standard Input
Output: Standard Output
You are given the ages (in years) of all people of a country with at least 1 year of age. You kn...
分类:
其他好文 时间:
2014-05-03 16:51:42
阅读次数:
427
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
For exa...
分类:
其他好文 时间:
2014-05-03 15:47:53
阅读次数:
289