Subtopic 4.2
Stack with a Linked List
5lessons25 min0done
In a stack built on a linked list, the top is the first node. push is the same as inserting at the head and pop the same as deleting from the head; both take O(1).
The lessons follow the same order and the same function names as the array version, so you can put the two side by side. The subtopic ends with a lesson on when to choose which.