The basic input for graph algorithms programs is Adjacency (for simple graphs) or Distance (for graph with weights) matrix which can be represented by two diemnsional array.
Here's the example of graph and corresponding matrix:
http://en.wikipedia.org/wiki/Adjacency_matrix
Any graph operation are very simple when youre working on arrays only. You can also easy draw graph having such matrix. Moreover, doing some matrix algebra you can optimize your code pretty well. Good luck.