Here are implementations of some of classic algorithm we learn in a CS degree. I try to remind them and, by coding them, to work on some languages, or method of coding like TDD.
I wrote it in Python3, tested with unittest. I found 2 graphs to test my solution on http://dominique.frin.free.fr/terminales/exosTES-Dijkstra-cor.pdf
Through this exercise, I discovered unittest basics. I also tried to code using TDD (Test Driven Development) method by following these 3 steps:
- Writing a red test (a test that doesn't pass)
- Implementing a solution that passes the tests
- Refactoring if needed
And each time I want to add features, I run into these 3 steps again.