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
496
144
3 months ago 00:26:54 1
How Your Brain Organizes Information
3 months ago 00:04:58 1
Graph Representation with an Adjacency Matrix | Graph Theory, Adjaceny Matrices
4 months ago 00:16:17 1
A* Search: How Your Map Applications Find Shortest Routes
8 months ago 00:01:01 1
Kimera + Hydra Baseline (from MIT Spark)
9 months ago 00:01:19 7
Same Stats, Different Graphs - CHI 2017
9 months ago 00:32:57 1
Building Recommender System with GNN - Part1: Intro to GNN
9 months ago 00:15:41 1
📊 How to Create & Customize Charts Graphs in WordPress Websites For Free: Chartify Tutorial
10 months ago 00:27:49 1
L’organisation de la Gendarmerie Nationale !
10 months ago 00:08:10 1
Les grades de la Gendarmerie Nationale !
10 months ago 00:30:55 1
“Global Depression by 2025“ - Simon Hunt
11 months ago 00:59:46 1
Understanding Oversmoothing in Graph Neural Networks (GNNs): Insights from Two Theoretical Studies