This is a little implementation of two common path traversal algorithms:
- Depth-First-Search
- Breadth-First-Search
using adjacency lists as Graph demonstration.
I wrote them while learning for my upcoming algorithms exam. The algorighms are copied more or less from my professors pseudocode, but since the concepts are so well known, it doesn't really matter where I get the algorithm from.
The only slight helpful thing here is to show novices how to acutally implement such algorithms in a simple to learn language like Python.
The code works both for Python3 and Python2.
Look there: incolumitas.com