Closed 13thThief closed 2 years ago
LIST-INSERT(L, x) x.next = L.head L.head = x
Shouldn't it be:
LIST-INSERT(L, x) x.next = L.head.next L.head = x
Oops, L.head points to the next node (or Null) in a Singly Linked List.
L.head
Shouldn't it be: