← All problemsSign in

3797. Count Routes to Climb a Rectangular Grid

LeetCodeArrayDynamic ProgrammingMatrixPrefix SumOpen on judge ↗

You are given a string array grid of size n, where each string grid[i] has length m. The character grid[i][j] is one of the following symbols: - '.': The cell is available. - '#': The cell is blocked. You want to count the number of different routes to climb grid. Each route must start from any cell in the bottom row (row n - 1) and end in the top row (row 0). However, there are some constrain

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start