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.
As discussed earlier, convert to angles. Now, _if there is a point_ on the circle which does not belong to any segment, rotate the set so that it become 0. Now we've got a "movie scheduling problem" from Skiena's book, which is solved by selecting the interval with the leftmost right border, eliminating intersections and then repeting until all the intervals are considered. Should be n*log(n).
- be1ca November 08, 2014The next is a wild guess, haven't had time to think over yet:
If there is _no such a point_, maybe something like this will work: rotate so that the smallest sector starts at 0, apply the algorithm, above; then revert angels (i.e. go clockwise), so that we start from another side of the smallest sector and go opposite direction; repeate the algorimth and choose the best of two results.
If there are multiple minimums, we may repeat it for each, so it's n^2. (However, not sure still if this is accurate for border conditions)