EZ

Eduzan

Learning Hub

Eduzan
Eduzan / DSA in Python

Graphs in Python

Computer Science / DSA in Python tutorial chapter - Published 2025-12-10 - DSA in Python

A graph is a non-linear data structure used to represent relationships between objects. Graphs are everywhere: social networks, road maps, computer networks, recommendation systems, dependency management, and more.

A graph is made of:

  • Vertices (Nodes): the entities (people, cities, computers)
  • Edges (Connections): relationships between entities (friendship, roads, cables)

Graphs can model both simple and complex real-world systems, and many important algorithms (BFS, DFS, shortest path, MST) are built on graphs.


End of lesson.