Adjacency Matrix Representation
Edges represented by a V × V matrix
- easily implemented as 2-dimensional array
- can represent graphs, digraphs and weighted graphs
- graphs: symmetric boolean matrix
- digraphs: non-symmetric boolean matrix
- weighted: non-symmetric matrix of weight values
- disadvantage: if few edges (sparse) ⇒ memory-inefficient
|