February 2020
Beginner to intermediate
616 pages
15h 16m
English
A Stack is a structure that can be implemented with arrays as well as linked lists. It is a sort of a bucket where the value you enter will be added at the bottom. The next item that you add to a stack will be kept just above the item that was added previously. The procedure of adding a value to the stack is called a push operation and the procedure of getting a value out of the stack is called a pop operation. The location where the value can be added or taken out of the stack is pointed at by a pointer called top. The value of the top pointer is -1 when the stack is empty:

When the push operation is executed, ...
Read now
Unlock full access