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.
Why do we need to complicate this so much.
- Santosh Radhakrishna March 28, 2015Lets keep the solution simple.
probability of your roll is 1-6.
roll value [1-6]
for each position
starting from 1 remembering the snakes and ladders starts at 1.
while current position < 100
i will check for each position from
if currentPosition<100 && currentPoint to currentPoint+6
how many ladders to i have ?
if ladders ==0
roll to max position with out a snake in 6;
else if ladders ==1
roll ladders.get(0).getIntialPosition();
currentPosition = ladders.get(0).getInitialPosition();
jump to ladders.get(0).getJumpPosition()
currentPosition = ladders.get(0).getJumpPosition();
return to step 1;
else if ladders > 1
maxValue= currentPosition;
for each ladder in ladders
if(maxValue<ladder.getJumpPosition())
maxValue = ladder.getJumpPosition();
get ladder with maxValue;
currentPosition = ladder.getInitialPosition;
get max value;
roll ladder.getIntialPosition();
currentPosition = ladder.getInitialPosition();
jump to ladder.getJumpPosition()
currentPosition = ladders.getJumpPosition();
return to step 1;
Its very crude in its form but implemented it will do the job.