next up previous
Next: 2. Adjacency matrix Up: CSE 2320: Algorithms and Previous: Labelled Graphs

Representation

1.
Adjacency lists
2.
Adjacency matrix

1. Adjacency list

Array Adj of $\mid$V$\mid$ lists, O(E)
Adj[u] is a pointer to a list of vertices v such that (u,v)
$\in$ Edges

Memory , Lookup



\psfig{figure=figures/f16-3.ps}



\psfig{figure=figures/f16-4.ps}



Copyright © 1998 The University of Texas at Arlington