【题目】
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
BY
Jeff Haden @jeff_haden
Sometimes the route to happiness depends more on what you don't do....
分类:
移动开发 时间:
2014-06-02 23:17:28
阅读次数:
525
10 Ways To Improve Your Mood改善情绪的10种方法Everyday
productivity and efficiency practically depend on how you feel. More often than
not, happy people are m...
分类:
其他好文 时间:
2014-06-02 21:52:31
阅读次数:
327
By reducing your bookmarks to show only the
icons, you can access more of them from the Bookmarks bar. This works great for
sites with recognizable fa...
分类:
其他好文 时间:
2014-06-02 17:39:03
阅读次数:
276
1. 做一个clear脚本,放到/bin下去 $vim /bin/clear #!/bin/bash
cmd /c cls 2. ctrl + L 3. 在cygwind中install ncurses (in Utils) and then you can
use: clear 我倾向于第三种方法...
In DOS you may have been used to D: to change
to the D drive. Cygwin provides a mapping of DOS/Windows drives to the unix file
system by mapping or mo...
Merge Sorted ArrayGiven two sorted integer
arrays A and B, merge B into A as one sorted array.Note: You may assume that A
has enough space (size that ...
分类:
其他好文 时间:
2014-06-01 12:04:32
阅读次数:
175
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 two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from B. The number of elements initialized in A and B are...
分类:
其他好文 时间:
2014-06-01 09:21:16
阅读次数:
292
我们通过nio学习了Reactor模式,但是在java7中又出现了NIO.2,新的异步框架出来了,在上节中的服务端视线中看不到Reactor的影子了,但是Netty in action中写到:But notice that NIO.2 handles threading and the creation of the so-called event loop for you.所以模式还是没变,只是封装了而已!那让我们来分解下AIO(NIO.2)的封装吧!...
分类:
其他好文 时间:
2014-06-01 01:40:11
阅读次数:
388