Search
⌘K

Leetcode 2328. Number of Increasing Paths in a Grid

Count all distinct strictly increasing paths in an m×n grid where you may move to 4-directionally adjacent cells. Exploit that moves only go from smaller to larger values (forming a DAG) to compute path counts efficiently and return the total modulo 10^9+7 (m*n up to 10^5).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.