Robot Pathfinding
MATH
DYNAMIC PROGRAMMING
Problem
Calculate the number of unique paths for a robot moving from the top-left to the bottom-right corner of an m
x n
grid, where it can only move right or down.
Return the total number of unique paths.
Examples
gridPaths(3, 5) // 15 gridPaths(2, 4) // 4
Loading...
Loading...Loading...