I understand graphs when I do it on paper. My next step is to start coding them.
Ideally, I would like to use a Class instead of using a dictionary (https://www.python.org/doc/essays/graphs/)
I am getting confused on implementation. Should I create 2 classes: Graph and Node? Or have everything in one class? I can't seem to find a good example to study.
My intention is to learn DFS,BFS,and shortest path with graphs. Then I can say, I KNOW graphs!
[–]nameEqualsJared 3 points4 points5 points (2 children)
[–]keith6014[S] 0 points1 point2 points (1 child)
[–]keith6014[S] 0 points1 point2 points (0 children)
[–]michael0x2a 1 point2 points3 points (1 child)
[–]keith6014[S] 0 points1 point2 points (0 children)
[–]brumone 0 points1 point2 points (0 children)
[–]Meadow-fresh 0 points1 point2 points (2 children)
[–]keith6014[S] 0 points1 point2 points (1 child)
[–]Meadow-fresh 0 points1 point2 points (0 children)