Skip to main content

Undirected Graph

Learn Undirected Graph (Graphs, Advanced DSA) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Edges That Go Both Ways In an undirected graph, an edge between u and v means the relationship is SYMMETRIC - "u is friends with v" implies "v is friends with u". Implementing this just means adding BOTH directions when building an adjacency list, and each vertex has a single DEGREE (not separate in/out counts).

More lessons in Graphs