algorithms.tutorialhorizon.com
Track the Maximum Element in a Stack. | Algorithms
: In a Stack, keep track of maximum value in it. It might be the top element in the stack but once it is poped out, the maximum value should be from the rest of the elements in the stack.