Skip to content

Commit e6616a9

Browse files
add docstring for better understanding
1 parent d60a6ae commit e6616a9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

searches/breadth_first_search_maze.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# MAZE TRAVERSAL
2-
2+
"""
3+
Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It begins at a root node (or an arbitrary node in a graph) and explores all of the neighbor nodes at the present depth before moving on to the nodes at the next depth level.
4+
This implementation of BFS is used to traverse a maze represented as a 2D grid. The maze contains walls (#), open paths ( ), a starting point (O), and a target point (X). The algorithm finds the shortest path from the starting point to the target point while avoiding walls."""
35
import curses
46
from curses import wrapper
57
import queue

0 commit comments

Comments
 (0)