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.
Does the following solve the problem in O(n log n)?
- kylejao February 12, 2013Sort the rectangles by the x-coordinate of the lower-left corner and remove those with this corner to the right of the point.
Sort the (remaining) rectangles by the x-coordinate of the upper-right corner and remove those with this corner to the left of the point.
Sort the (remaining) rectangles by the y-coordinate of the lower-left corner and remove those with this corner above the point.
Finally, sort the remaining rectangles by the y-coordinate of the upper-right corner and remove those with this corner below the point.
If there is nothing left, then no rectangle contains the point. Otherwise, the one left is as desired.