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.
Use max heap and min heap. Insert the numbers in max and min heap alternatively. But if the number to be inserted in max heap is greater than minimum of the min heap, then add the top element of min heap to max heap, and the new number at the top of min heap and heapify it. Similarly for the number being inserted in min heap is less than max element in max heap, then insert the max number of max heap in min heap, and then put the new number at the top of max heap & heapify it. At any time all the numbers in max heap will be less than equal to all number all number in the min heap. And difference in number of element in max and min heap will be atmost one, in which case the top element in max heap is the median, else the average of top of max and min heap.
- kkgibbs151 July 25, 2014