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.
Dnt knw how good this will be..but we can try this..
- Amit Jain April 15, 2008We can construct a binary COMPLETE tree(no node should be incomplete) of first 10 elements strictly. Then keep reading the next elements one by one and check out in the tree where they can fit. We will update the node data only if(while travelling recursively):
1. The number is greater than the data in the node but smaller than the right child of the node
OR
2. The number is greater than the node and there is no right child for that node.
When we are done with the data in the file..we will have 10 elements(as it is a Complete Binary tree of 10 elements) in the tree and all those are the top 10 elements.
So we can read the final tree in Inorder traversal to get the top 10 elements.