Reverse 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,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-05-21 19:08:08
阅读次数:
195
Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口
Collection是最基本的集合接口,一个Collection代表一组Object,即C....
分类:
其他好文 时间:
2014-05-21 18:21:04
阅读次数:
219
计数排序的基本思想是:统计一个数序列中小于某个元素a的个数为n,则直接把该元素a放到第n+1个位置上。当然当过有几个元素相同时要做适当的调整,因为不能把所有的元素放到同一个位置上。计数排序假设输入的元素都是0到k之间的整数
1 #include 2 void sort(int *A, int *B....
分类:
其他好文 时间:
2014-05-21 18:07:55
阅读次数:
294
本次内容:arraylist()1、 1 package list; 2 3 import
java.util.ArrayList; 4 import java.util.Date; 5 import java.util.List; 6 7 /** 8
* 测试list的基本方法 9 * ...
分类:
编程语言 时间:
2014-05-21 17:55:42
阅读次数:
263
c-sharp-list-orderby-alphabetical-order
分类:
其他好文 时间:
2014-05-21 17:54:24
阅读次数:
312
Given a sorted linked list, delete all nodes
that have duplicate numbers, leaving onlydistinctnumbers from the original
list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-05-21 17:51:09
阅读次数:
190
在空白窗体上添加: TFDConnection,
TFDPhysSQLiteDriverLink, TFDGUIxWaitCursor, TMemoprocedure
TForm1.FormCreate(Sender: TObject);var List: TStrings; V: Varian.....
分类:
数据库 时间:
2014-05-21 17:47:06
阅读次数:
301
在以前的Java版本中,开发者只能将注解(Annotation)写在声明中。对于Java 8,注解可以写在使用类型的任何地方,例如声明、泛型和强制类型转换等语句:
@Encrypted String data;List strings;myGraph = (@Immutable Graph) tmpGraph;
乍一看,类型注解并不是Java新版本最炫的特性。事实上,注解只是语法!工具...
分类:
编程语言 时间:
2014-05-21 15:33:25
阅读次数:
332
活动安排问题要求高效地安排一系列争用某一公共资源的活动,贪心算法提供了一个简单的方法,使尽可能多的活动能兼容地使用公共资源。贪心算法并不总能求得问题的整体最优解,但对于活动安排问题,贪心算法却能做到,使得最终所确定的相容活动集合的规模最大,证明不在这里给出。代码如下:
def greedyManage(meeting):
length=len(meeting)
meeting.sort(ke...
分类:
编程语言 时间:
2014-05-21 14:13:42
阅读次数:
232
编辑/etc/apt/sources.list文件root@debian:~#cat/etc/apt/sources.list##debcdrom:[DebianGNU/Linux7_Wheezy_-OfficialSnapshotamd64LIVE/INSTALLBinary20131013-23:23]/wheezymain#debcdrom:[DebianGNU/Linux7_Wheezy_-OfficialSnapshotamd64LIVE/INSTALLBinary20131013-23:2..
分类:
其他好文 时间:
2014-05-21 13:03:37
阅读次数:
408