News for hackers. Stuff that matters.
Re:Ask HN: What are the best interview questions you've been... by wadeboggs on Tuesday February 21, 2017 @08:56PM (#13702221)
Make another stack with the latest minimum, then when you pop that top value, you also pop it off the minimums stack. Then you have the last minimum before that one.

Is that it?

Re:Ask HN: What are the best interview questions you've been... by sand500 on Tuesday February 21, 2017 @10:05PM (#13702638)
What if you added values that are greater then the minimum at the top of the minimum stack but less than the next value on the minimum stack?
Re:Ask HN: What are the best interview questions you've been... by antoaravinth on Tuesday February 21, 2017 @10:46PM (#13702832)
Your using two stacks now. This is the solution that I had told but your not satisfying the condition w.r.t to space , its O(n) not O(1).