I read it is ideal to represent sparse graphs by adjacency lists and dense graphs by an adjacency matrix. But I would like to understand the main difference between sparse a
From Data Structures and Algorithms with Object-Oriented Design Patterns in C++ , p. 534, by Bruno P. Reiss:
Informally, a graph with relatively few edges is sparse, and a graph with many edges is dense.
Definition (Sparse Graph): A sparse graph is a graph G = (V, E) in which |E| = O(|V|).
Definition (Dense Graph) A dense graph is a graph G = (V, E) in which |E| = Θ(|V|2).