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.
If we assume that we know order of sums in P, we can do it as follows:
n = no. of elements in S. To be calculated based on size of P. Simple quadratic equation solver.
s[0]=(p[0]+p[1]-p[n-1])/2
Why? Because:
p[0]=s[0]+s[1]
p[1]=s[0]+s[2]
p[n-1]=s[1]+s[2]
Now run a loop and you're done.
Code in Java:
- diptesh February 25, 2016