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 le...
分类:
其他好文 时间:
2014-08-27 00:20:16
阅读次数:
232
reverse():倒序sort():简单数据类型sortOn():复杂数据类型数组.sort()默认排序数组.sort(排序方式)排序方式是一些定义好的整数常量数组.sort(比较函数)自定义的比较函数sortOn与sort的区别在于需要传入排序对象的属性,其他一直。如果不是复杂数据类型,如都是整...
分类:
其他好文 时间:
2014-08-26 13:37:56
阅读次数:
181
题目:Reverse Linked List IIReverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,ret...
分类:
其他好文 时间:
2014-08-26 13:35:46
阅读次数:
223
题目: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 p...
分类:
其他好文 时间:
2014-08-26 13:08:16
阅读次数:
401
官方的jquery.easyui.min.js已经实现了对实心圆点框id的获取,我们看官方如下代码:
如果我们让"_c0"的值变成“indeterminate”那么我们就能够得到想要的结果了,具体实现看如下代码:、
var nodes = $('#tt').t...
分类:
其他好文 时间:
2014-08-26 11:43:55
阅读次数:
2504
输入输出优化:直接加BufferedStream 1 importjava.io.BufferedInputStream; 2 importjava.io.BufferedOutputStream; 3 importjava.io.PrintWriter; 4 importjava.util.Arr...
分类:
其他好文 时间:
2014-08-26 01:43:35
阅读次数:
209
题目:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
思路:
方法1:首先把句子看做由词组成的,例如“A B C”,因此可以将句子的所有字符前后交换,得到“C...
分类:
其他好文 时间:
2014-08-25 22:53:04
阅读次数:
194
Clone GraphClone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are l...
分类:
其他好文 时间:
2014-08-25 22:22:44
阅读次数:
237
Reverse Integer
Total Accepted: 27372 Total
Submissions: 68133My Submissions
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
题目咋看起...
分类:
其他好文 时间:
2014-08-25 21:12:54
阅读次数:
198
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.思路: 1 cla...
分类:
其他好文 时间:
2014-08-25 18:38:04
阅读次数:
211