Oct 20, 2023
You are right, and I believe the algorithm is slightly more time efficient with an adjacency list too. I mainly used the matrix because I think more people are familiar with it.
I will probably do a follow up article showing the algorithm with an adjacency matrix in the future. Thanks for your comment.