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.
Alright, I think this might work, heres my slight modification to this proof.
- thiagarajan.ts February 08, 2013The bottom right element is always biggest. So we remove that at every instance, and replace it with an element smaller than the top left. Now to restore this property of the matrix, we must percolate up or left(the 2nd biggest element is either above it or to its left.) Either way it will take r+c swaps to move the element to the starting location(along the borders, so that the property is conserved).
This entire process needs to be repeated 'k' times to get the kth largest element.
The question asks for an in-place algorithm, and this is it.
Memory would be O(1), and Run time is O(K. (R+C)) Where R,C and dimensions(rows, col numbers), K is the kth largest to be fetched
This fetches all top k entries though, so it would not be as efficient as other methods to get top kth maybe