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.
Pretty simple solution with n list that don't have the same length.
Walkthrough with this example:
5->9->17
4->13->18->20
8->19->21->24
iteration #1: Pointers will point to 5,4,8 so:
minVal: 4, maxVal: 8, indexMinLeft: 1 (pointing at list starting with 4)
minDifference = 8-4=4
iteration #2: Pointers will point to 5,13,8 so:
minVal: 5, maxVal: 13, indexMinLeft: 0 (pointing at list starting with 5)
minDifference = 13-5=8
and so on and so on. The "indexMinLeft" comes into play when we reach the last item of a certain list. In that case we can't go to the next item on the list, so instead we go to the 2nd smallest number and go to the next item in its list. Eventually pointers to all lists will point to their last element in which case we break out of the loop and return the answer :)
- someone1 December 31, 2014