Skip to content
DeepForgeby svx
All problems
EasyProbabilitypr-328

Lattice Paths Count

Problem

The number of monotone lattice paths from (0, 0) to (m, n) using only right and up steps is C(m + n, m).

Given m and n, return the count.

Hint

Choose which of the m + n steps go right.

Test cases

case 1
in: [1,1]
expected: 2
case 2
in: [2,3]
expected: 10
case 3
in: [4,0]
expected: 1
Starter codePython
def lattice_paths_count(m, n):
    # Your code here
    pass

3 test cases · run your code against them in the editor