Exercise 10: Adjacency List Storage
In the above representation, each edge (x,y) ...
- has an entry for y in x's list
- has an entry for x in y's list
which means ...
- we don't need to worry about canonical edge representation
- but we have a significant storage overhead 2×E
How could we reduce the amount of storage needed for lists?
How would the insertE() and removeE() functions change?
|