Skip to content

Instantly share code, notes, and snippets.

@xnorcode
Last active May 3, 2018 21:10
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