This is a small project I made for learning purposes, I made this so I could paint the image in my head of how BFS and DFS both work, this is a pretty simple code that let's the user input dimensions of a matrix, then chose the starting cordinates to begin DFS or BFS algorithms. This is a great example to learn on as you can see the difference of how both of these algorithms fill in the matrix you set.
There is nothing to much here, you can:
- Carefully anotated code, so you can understand each step of the code
- Select the size of the matrix you would like to see
- Chose between DFS and BFS
- Chose from which square these algorithms will start from
- Watch step by step as the algorith goes square by square and visits it
You are free to copy and change this code however you like, feel free to contact me for any further questions