🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Adjacency Matrix

In plain terms

A grid representing which graph nodes are connected.

Going deeper

An adjacency matrix uses a 2D table where cell [i][j] marks an edge between nodes i and j. It gives instant edge lookups but uses space proportional to nodes squared.

Under the hood

O(1) edge checks but O(VΒ²) memory, wasteful for sparse graphs where adjacency lists are better.

Examples

Dense graphs, Floyd-Warshall, network connectivity, small fixed graphs.

Think of it like...

Like a seating chart grid marking which guests know each other.

Feedback & Bug Report