How can graphs be represented in a single class?
I know how to make a graph with several classes such as Vertex which defines the vertex, Stack which defines the Stack, Graph which lays out the graph and includes any searching algorithm, and a Main class which creates vertexes, and edges and does the search etc. though I would really like to know if there is any simpler way to create a graph, having multiple classes is not allowed on TopCoder where I could use a graph to solve a problem.