Graph Data Structure Implementation (Python)
How to store a graph?
1 | # Example Graph: |
Adjacency List
1 | graph1 = { |
Adjacency Matrix
1 | graph2 = [ |
Edge List
1 | graph3 = [ |
Cross linked list
1 | class Node: |
Print the neighbors of a vertex
1 | # Example |
How to store a graph?
1 | # Example Graph: |
1 | graph1 = { |
1 | graph2 = [ |
1 | graph3 = [ |
1 | class Node: |
1 | # Example |
Author: Simba
License: Copyright (c) 2019 CC-BY-NC-4.0 LICENSE
Slogan: 乳虎啸谷,百兽震惶