单向链表 class Node { int val; Node next; Node(int val) { this.val = val; } } 双向链表 class Node<E> { E item; Node<E> next; Node<E> prev; Node(Node<E> prev, E element, Node<E> next) { this.item = element; this.next = next; this.prev = prev; } }