In an attempt to remove duplicate elements from list, I go to the lengths to take advantage of  methods in the java api. After investiagting the document of java api, the result is so satisfying that I speak hightly of wisdom of developer of java lan…
如何用javac 和java 编译运行整个Java工程 (转载)  http://blog.csdn.net/huagong_adu/article/details/6929817 [转]在Linux下编译与执行Java程序  http://www.cnblogs.com/howard-queen/archive/2012/01/30/2331795.html 执行 java /root/first 仍然出现错误 "Exception in thread "main" jav…
[Description] A queue is a collection that implements the first-in-first-out protocal. This means that the only accessiable object in the collection in the first one that was inserted. The most common example of a queue is a waiting line. [Interface]…
Statements: This blog was written by me, but most of content  is quoted from book[Data Structure with Java Hubbard] [Description] This simulationillustrates objectoriented programming(OOP). Java objects are instantiated to represent all the interacti…
[Description] At ree is a nonlinear data structure that models a hierarchical organization. The characteristic eatures are that each element may have several successors (called its "children") and every element except one (called the "root&…
参考资料 <算法(java)>                           — — Robert Sedgewick, Kevin Wayne <数据结构>                                  — — 严蔚敏   为什么要使用哈希表 查找和插入是查找表的两项基本操作,对于单纯使用链表,数组,或二叉树实现的查找表来说,这两项操作在时间消耗上仍显得比较昂贵. 以查找为例:在数组实现的查找表中,需要用二分等查找方式进行一系列的比较后,才能找到给定的键…
When learning the usage of map collection in java, I found serveral beneficial methods that was encountered in the daily life. Now  I made a summary: [java] view plaincopy import java.util.ArrayList; import java.util.Collections; import java.util.Com…
Method 1: Add one list into the other list. For example, if list1is {22, 33, 44, 55} and  list2 is {66, 77, 88, 99},then append(list1, list2)will change list1to {22, 33, 44, 55, 44, 66, 77, 88, 99}. static void append(Node list1, Node list2) { if (li…
The Java Connections FrameWork is a group of class or method and interfacs in the java.util package. Its main purpose is to provide a unified framework for implementing common data structure. A collections is a object that contains other objects,whic…
Method 4: Gets the value of element number i For example, if list is {22, 33, 44, 55, 66, 77, 88, 99}, then get(list, 2) will return 44. Solution 1: static int get(Node list, int i) { if (i < 0) { throw new IllegalArgumentException(); } for (int j =…