Allocate Node
The new node is prepared before any existing link is changed.
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Insertion At Beginning adds a node by locating the correct position and changing a small number of links.
The new node is prepared before any existing link is changed.
Traversal stops at the predecessor when inserting in the middle.
Connect the new node forward first, then connect the predecessor to it.
Empty list, head insertion, and tail insertion each adjust different pointers.