Linked list class from princeton