Graduate Program Interview Questions

13,042 graduate program interview questions shared by candidates

There are N walls, a man can jump up A meters, but he slide down B meters after 1 jump. How many jumps are needed in total to jump out all N walls? For example, you have 1 wall, the wall is 10 meters, the man can jump 10 meters in one shot, but slide down 3 meters per jump. Then he will need 1 jump to jump over that 10 meters wall; if we have a wall of 18 meters, the man need 3 jumps, because he slides down 3 meters after the first jump, and the second jump can jump to 17 meters at most, and thus 3 jumps are required. There will be at most 10^4 walls, each wall can be very tall.
avatar

Graduate Student Program

Interviewed at Visa Inc.

3.8
Mar 27, 2015

There are N walls, a man can jump up A meters, but he slide down B meters after 1 jump. How many jumps are needed in total to jump out all N walls? For example, you have 1 wall, the wall is 10 meters, the man can jump 10 meters in one shot, but slide down 3 meters per jump. Then he will need 1 jump to jump over that 10 meters wall; if we have a wall of 18 meters, the man need 3 jumps, because he slides down 3 meters after the first jump, and the second jump can jump to 17 meters at most, and thus 3 jumps are required. There will be at most 10^4 walls, each wall can be very tall.

Viewing 1341 - 1350 interview questions

Glassdoor has 13,042 interview questions and reports from Graduate program interviews. Prepare for your interview. Get hired. Love your job.