List Insertion
Let H be a pointer to a linked list of nodes, and let each of P and N be a variable whose value is a pointer to a node. Let v be the new value.
N := address of newly allocated node
N.info := v
N.link := null
P := H
While P != null
P := P.link
P.link := N
Previous slide
Next slide
Back to first slide
View graphic version