This week we learned more about linked list. Linked list is a class with subclass linked nodes. The attributes of linked list are head, tail, and length, where head is the first node in the linked list, tail is the last node in the linked list, and length is the number of nodes in the linked list. The subclass linked node represents a node in the linked list, linked nodes have attributes: value and next, where value is the value of the current node, and next is the next node after the current node.
Linked lists have methods that add a node in the middle of the list somewhere, or a method that takes out a node from the list somewhere.
No comments:
Post a Comment