摘要:
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 ... 阅读全文
摘要:
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 ... 阅读全文
摘要:
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 阅读全文