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.
Answer:
Please try to solve this by yourself before seeing my solution in 1/2 hour only.
Screwed up this one big time. No help came from interviewer for proceeding on the solution. In the interview, I was thinking that it may have some recursive / dynamic programming solution. I guess, I was stumped to even grasp it at first.
Tried to discuss an example with interviewer.
// canIWin(2, 3)
I think I got confused by his inputs, as he suggested that optimum play by Player A not necessarily means that he will win if he chooses the highest available number.
Anyhow, I stumped and couldn't proceed much. Horrific.
Solution: Now i gave myself half an hour to solve this question by myself after the interview. Here is my approach.
According to me, The optimal play from player A will always have a first advantage of selecting the largest number
So e.g, for N = 10 , he may select 10, 8 , 6 , 4
- you.win September 24, 2014