# Who Knows Whom? When Anything Can Connect: Graphs

Find a person's friends in one step, in a network where anyone can know anyone and friendships loop back around: why a list of pairs and a tree both fall short, and the structure that fits, the graph, with one-way and two-way connections and weights.

![Cheat sheet: Who Knows Whom? When Anything Can Connect: Graphs](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/1bd9e85c698248e7807cc18744ab4871.webp)

- Category: Data Structures
- Level: Journeyman
- Tags: data structures, Directed Graph, Edge, Graph, Vertex, Weighted Graph
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/ds-graphs-cheat-sheet
