Graph implementation must start from 0?

The first implementation of a graph using an adjacency list, it appears it only works for graphs starting at 0 where each vertice increments by 1. So you could NOT have a graph like:

  /\    \
3   4    7

Is this by design just to be simple for the first intro to graph implementation?

1 Like