Graph Theory37 sections · 1633 units
Open in Course

Types of Graphs - Undirected

Two-way streets

Not all connections are the same. In an Undirected Graph, connections go both ways. Think of Facebook Friendships: If you are friends with someone, they are also friends with you. The relationship is mutual.

Roads between cities (assuming two-way traffic) form an undirected graph. If you can drive from A to B, you can drive from B to A. When you store an undirected edge between uu and vv, you must remember both directions. This affects how you build your adjacency list later.