Linked Lists - andrewkyllo-401-advanced-javascript/seattle-javascript-401d34 GitHub Wiki
Linked List
- A sequence of Nodes that are connected/linked to each other.
- Each Node references the next Node on the link.
Terminology
- Linked list- A data structure that contains nodes that links/points to the next node in the list.
- Singly & Doubly - Refers to the number of references the node has (next & or previous).
- Node - Individual items/links that lice in a linked list.
- Next - Property contains the reference to the next node.
- Head - The Head is a reference type of type Node to the first node in a linked list.
- Current - The Current reference is the Node being looked at.
Traversal
- You cant use a loop and instead depend on the Next value in each node to guide us to the next node.
- We use a while loop to check to see if the next node is null.
Big O
- The Big O of time for Includes would be O(n)
- The big O of space for Includes would be O(1)