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.
Assume that the input board is given as an array of integers.
So, array(i) -> the number of steps infront(ladder)/backwards(snake) from 'i'.
So, if there is no snake/ladder , then array(i) = 0.
If there is a snake from 5 to 3, then array(5) = -2.
Assuming the above, we can use the DP as
optimalRole(i+j+ array(i+j)) = Min(optimalRole(i+j+array(i+j)), optimalRole(i)+1).
However, if there is a configuration where 10 ->20 ->30 , then landing on 10 takes you to 30. (i.e.. ladder multiple times or so .. ).
We can solve the same with a function to calculate resultant Index
- Ravi March 30, 2015