Unique Paths

Medium · Dynamic Programming · about 15 minutes

Asked at Google, Amazon, Bloomberg.

A robot sits in the top-left cell of an m × n grid and needs to get to the bottom-right cell, moving only right or down one cell at a time. How many different routes can it take?

Related guides