Maze
Desc: You are trapped in a maze, represented by a 2D grid of size N x M. Some cells are passable (denoted by 0), and some cells are blocked (denoted by 1). You start from the top-left corner of the maze and need to reach the bottom-right corner. However, you can only move right or down. Find the number of distinct paths from the top-left corner to the bottom-right corner of the maze. If there is no possible path, return 0. Input: A 2D grid maze of integers where: 1. 0 represents a passable cell. 2. 1 represents a blocked cell. Output: Return the total number of distinct paths from the top-left to the bottom-right of the grid.
Desc: You are trapped in a maze, represented by a 2D grid of size N x M. Some cells are passable (denoted by 0), and some cells are blocked (denoted by 1). You start from the top-left corner of the maze and need to reach the bottom-right corner. However, you can only move right or down. Find the number of distinct paths from the top-left corner to the bottom-right corner of the maze. If there is no possible path, return 0. Input: A 2D grid maze of integers where: 1. 0 represents a passable cell. 2. 1 represents a blocked cell. Output: Return the total number of distinct paths from the top-left to the bottom-right of the grid.