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.
My solution was on the lines of Balanced BST. Each Node in BST will hold following values
Now, given two Ymin and Ymax, we start at the root node. First we examine the left subtree. Following are the possibilities
Similarly, we examine the right subtree and find the value of XRight.
At the outset, this solution looks something like interval trees/augmented trees/Range Indexed Trees but I am not sure and I will have to look if that is the case.
- Amm Sokun May 23, 2013PS: For the uninitiated folks who think we just need to find min(X) in the given set, I apologize for not being clear enough. Let me take an example.
Given: an unordered list of (x,y)= (1,28), (5,6), (11,13), (24,37), (8,1), (56,10), (78,19)
and given following value of Ymin, Ymax, the output would be something like
1. Ymin=13, Ymax=19, min(X) = 11
2. Ymin=6, Ymax=37, min(X) = 1