Partition ListGiven a linked list and a valuex,
partition it such that all nodes less thanxcome before nodes greater than or
equal tox.You should pres...
分类:
其他好文 时间:
2014-06-07 06:24:57
阅读次数:
179
Today is the last day that all the laptops of
winXP OS should be upgrade to WIN7. After updated. when i tried to debug my
application,i received this ...
分类:
其他好文 时间:
2014-06-06 15:51:14
阅读次数:
275
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-06-05 14:15:07
阅读次数:
221
一。介绍public abstract void invalidateDrawable
(Drawable who)Called when the drawable needs to be redrawn. A view at this point
should invalidate itself ...
分类:
其他好文 时间:
2014-06-05 14:13:44
阅读次数:
218
Given a linked list, swap every two adjacent
nodes and return its head.For example,Given1->2->3->4, you should
return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-06-05 13:41:44
阅读次数:
231
【题目】
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 in each of the two partitions.
For example,
Given 1->4->3-...
分类:
其他好文 时间:
2014-06-03 00:02:29
阅读次数:
270
题意:对数列有三种操作:
Print operation l,?r. Picks should write down the value of .
Modulo operation l,?r,?x. Picks should perform assignment a[i]?=?a[i] mod x for
each i (l?≤?i?≤?r).
Set operation k...
分类:
其他好文 时间:
2014-06-02 02:56:56
阅读次数:
465
【题目】
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 3 3 2 1
\ / / / \ ...
分类:
其他好文 时间:
2014-06-01 15:33:45
阅读次数:
297
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space....
分类:
其他好文 时间:
2014-06-01 10:41:23
阅读次数:
242
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is...
分类:
其他好文 时间:
2014-06-01 09:05:42
阅读次数:
271