Number of Paths in a Grid
CodeChefOpen on judge ↗
While learning simple DP problems, Ira came across this simple problem. Given a grid in two dimensions having N rows and M columns, how many paths exist from top-left cell of the grid to bottom-right cell when allowed movements in one step are one cell from left to right or one cell top to bottom only? Formally, a cell of the given grid G in the ith row and j th column is represented as G(i, j)
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.
Sign in to chat with the tutor and save your progress.
Sign in to start