Implementation of a graph using a two dimensional linked list