← Questions

Count grid paths through ordered checkpoints

0
GoogleCodingLast asked Sep 2026

An n x m grid. A path starts at the bottom-left cell and ends at the bottom-right cell. Each move goes one column to the right and either one row up, the same row, or one row down, and the path must stay inside the grid.

Count the possible paths, then count only those that pass through a given list of checkpoint cells in the given order.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding