is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
Since you're working with a stack, there's no problem. The only way for an item to get removed from the stack is to pop it from the top.
- Inverse.Falcon August 21, 2010We don't need to know how 'min' a value is if it isn't the minimum. Why? Because it's a stack! You'll need to pop that 'not min' value BEFORE you can pop the current min value.
Simple example: Push 4, 5
1. 4 is pushed. Since there is no min, 4 is pushed on the min stack.
2. 5 is pushed. Since 5 > 4 (min), we don't push 5 on the min stack.
5 CANNOT be the min until 4 is popped. But 4 can't be popped until 5 is popped first. And that would just get us an empty stack.