摘要: public class LinkList<T> { public class Node{ private T data; private Node next; public Node(){ } public Node(T data,Node next){ this.data=data; this.next=next; } } private Node header; private Node ... 阅读全文
posted @ 2011-07-16 21:12 朱旭东 阅读(292) 评论(0) 推荐(0) 编辑
摘要: public class LinkList<T> { public class Node{ private T data; private Node next; public Node(){ } public Node(T data,Node next){ this.data=data; this.next=next; } } private Node header; private Node ... 阅读全文
posted @ 2011-07-16 21:07 朱旭东 阅读(489) 评论(0) 推荐(0) 编辑
摘要: import java.util.Arrays;public class SequenceList<T> { private int DEFAULT_SIZE=16; //保存数组的长度 private int capacity; //定义一个数组用于保存顺序线性表的元素 private Object[] elementData; //保存顺序表中元素的当前个数 private int size=0; public SequenceList(){ capacity=DEFAULT_SIZE; elementData=new Object[capacity]; } public Se 阅读全文
posted @ 2011-07-16 20:08 朱旭东 阅读(812) 评论(0) 推荐(0) 编辑