Sunday, September 18, 2011

How to find min of a stack in o(n)

Original stack 3,4,6,2,8,1,9
Maintain a stack 3,3,3,2,2,1,1

No comments: