Program to find minimum number in a Stack in O(1) time

Stack is a data structure used for storing collection of data where order in which data is arriving is important. In Stack, insertion and deletion both happened from the same end which is known as “Top”.
The data which is arrived last will be deleted first in Stack. This data ordering is called as Last in First out or LIFO. Before going ahead have a look into Stack basics and Stack Implementation.

(more…)
Program to find minimum number in a Stack in O(1) time Read More