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.
What is the property of the binary tree? If it is like Binary Search Tree i.e. left < root < right, then just iteratively go up from node with lower key until encounter the first ancestor whose key is greater than the other node's key. If it is only normal tree, find the path from each node to the root, then go back and find the early common node of two paths.
- David September 09, 2012If there is only pointers from parent to child nodes, we can use the property of Binary search tree to search from the root and choose to search the left or right subtree.