Graph HW1

Write a function to find the diameter of a graph.