Graph Theory37 sections · 1633 units
Open in Course

What is a Graph?

Intuition

A Graph is a collection of things and the relationships between them. Unlike Arrays (which store data in a straight line), graphs can have complex, web-like connections.

Think of a social network: people are the "things" and friendships are the "relationships." Think of a city map: intersections are things and roads are relationships. Think of the internet: web pages are things and hyperlinks are relationships.

If you can phrase a problem as "things connected to other things," you can probably solve it with graph algorithms.