You are given a maze represented by a 2D grid. The grid consists of cells where:
Your task is to find the shortest path from the top-left corner (0, 0) to the bottom-right corner (n-1, m-1) using Breadth-First Search (BFS).
Rules:
Example:
For the maze:
[[0, 1, 0],
[0, 0, 0],
[1, 0, 0]]
The shortest path from (0,0) to (2,2) takes 5 steps.
Today, on November 20 (Universal Children’s Day), imagine this problem as guiding children safely through a maze. Use your BFS skills to help them find the escape route!