Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emmo00/search-dfs-bfs
An implementation of the DFS and BFS algo.
https://github.com/emmo00/search-dfs-bfs
bfs dfs queue stack
Last synced: about 15 hours ago
JSON representation
An implementation of the DFS and BFS algo.
- Host: GitHub
- URL: https://github.com/emmo00/search-dfs-bfs
- Owner: Emmo00
- Created: 2024-04-11T00:58:14.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-23T21:54:43.000Z (9 months ago)
- Last Synced: 2024-04-23T23:16:40.818Z (9 months ago)
- Topics: bfs, dfs, queue, stack
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My search DFS and BFS
An implementation of the DFS and BFS algo.
## Usage
To use it, just clone the repo and run `main.py`
```bash
python3 main.py
```or
```bash
python main.py
```To run the DFS visualization, use the `Queue` class when calling the solve method in the `main.py` file. Example:
```python
from maze import Maze, Stack, Queuemaze = Maze("maze.txt")
maze.solve(Queue)
```
To run the BFS visualization, use the `Stack` class when calling the solve method in the `main.py` file. Example:
```python
from maze import Maze, Stack, Queuemaze = Maze("maze.txt")
maze.solve(Stack)
```
### Contributions are welcome, but this repo is mostly for my learning
.