AlgoFrames

Memory cost

Warm-up · Multiple choice · about 3 min

A road map has 10,000 crossings (vertices) and 25,000 roads (undirected edges). About how many values does an adjacency matrix store, and how many does an adjacency list store?

Learn the idea first: Adjacency matrix, adjacency list, edge list, a visual lesson.

More Adjacency matrix, adjacency list, edge list problems