Skip to content

Instantly share code, notes, and snippets.

@xnorcode
Last active May 3, 2018 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xnorcode/47f1dceb4610fe5ec2757985c4b5d4cc to your computer and use it in GitHub Desktop.
Save xnorcode/47f1dceb4610fe5ec2757985c4b5d4cc to your computer and use it in GitHub Desktop.
Linked List Node Class
public class LinkedList<T> {
// Reference to the head node
Node head;
// node class
class Node {
// Node data
T data;
// Next node reference
Node next;
// Node constructor
public Node(T data, Node next){
this.data = data;
this.next = next;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment