Last active
May 3, 2018 21:10
-
-
Save xnorcode/47f1dceb4610fe5ec2757985c4b5d4cc to your computer and use it in GitHub Desktop.
Linked List Node Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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