← Amazon questions

Probability of remaining in rectangle

Filed under Amazon

Given a grid of dimensions m x n and a starting position (r, c), calculate the exact probability that a moving object remains inside the grid after performing exactly k random moves (up, down, left…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.