摘要:
public class LinkedListStack<E> implements Stack<E> { private LinkedList<E> list; public LinkedListStack(){ list = new LinkedList<>(); } @Override pub 阅读全文
摘要:
//删除链表中第index(o-based)个位置的元素,返回删除的全速 //在链表中不是一个常用的操作,练习用:) public E remove(int index) { if (index < 0 || index > size) throw new IllegalArgumentExcept 阅读全文
摘要:
public class LinkedList<E> { private class Node { public E e; public Node next; public Node(E e, Node next) { this.e = e; this.next = next; } public N 阅读全文
摘要:
public class LinkedList<E> { private class Node { public E e; public Node next; public Node(E e, Node next) { this.e = e; this.next = next; } public N 阅读全文
摘要:
package com.practice; public class LoopQueue<E> implements Queue<E> { private E[] data; private int front,tail; private int size; public LoopQueue(int 阅读全文