525
2 Likes

DSA Crash Course [Part 75] - Count Paths Approach

In this lesson, Alvin explores the strategy to solving the following interview problem:

Write a function, count_paths, that takes in a grid as an argument. In the grid, 'X' represents walls and 'O' represents open spaces. You may only move down or to the right and cannot pass through walls. The function should return the number of ways possible to travel from the top-left corner of the grid t