Linked List

A Dynamic Data Structure

A linked list is a linear data structure where each element is a separate object made of at least two items: the data and a reference to the next element. Conventionally, each element of a Linked List is called a node.

public class Node<E> {
  private E data;
  private Node<E> next;

  // we can have constructors, setters, getters, etc.
}

Here is a minimal implementation for a Linked List:

public class LinkedList<T> {
  private Node<T> head;

  // we can have constructors, methods to add/remove nodes, etc.
}
Resource

Wikipedia’s entry on Linked List is great!