How do we represent graphs in C ?
I will explain three methods of representing graphs in C using Standard Template Library (STL)’s data structures:
1. Direct translation of the graph definition (Set of vertices, Set of Edges): 5:39
2. Adjacency list: 10:27
3. Adjacency matrix: 14:27
Comparison of all methods: 17:01
For each method we implement an algorithm solve the Konigsberg Bridge Problem, i.e. to check if a graph is Eulerian, that means if we can draw the graph and cover all edges exactly once without ever going backwards or disconnecting the pen and the paper.
Link to all source codes:
Check my other video on using Bazel to build C files in Visual Studio Code:
Start a new C program using this Bazel template:
Keep in touch with me:
1 view
413
122
6 months ago 00:01:01 1
Kimera + Hydra Baseline (from MIT Spark)
7 months ago 00:01:19 6
Same Stats, Different Graphs - CHI 2017
7 months ago 00:32:57 1
Building Recommender System with GNN - Part1: Intro to GNN
7 months ago 01:05:47 1
Accelerating Scientific Discovery by Markus J. Buehler
8 months ago 00:15:41 1
📊 How to Create & Customize Charts Graphs in WordPress Websites For Free: Chartify Tutorial
9 months ago 00:27:49 1
L’organisation de la Gendarmerie Nationale !
9 months ago 00:08:10 1
Les grades de la Gendarmerie Nationale !
9 months ago 00:30:55 1
“Global Depression by 2025“ - Simon Hunt
9 months ago 00:03:38 1
The Bloop: A Mysterious Sound from the Deep Ocean | NOAA SOSUS
9 months ago 00:59:46 1
Understanding Oversmoothing in Graph Neural Networks (GNNs): Insights from Two Theoretical Studies