The graph is very large but undirected. Edges are unweighted.
In my implementation, I have to find the vertex with max degree and do deletion on both vertexes and edges.
Depends on what other requirements you have. A naive, simple approach could be
class Node
{
List edges;
int id;
}
where you'd have a List of all the nodes in the graph. The problem is this can become inconsistent; e.g. node A might be in node B's edges list, but node B might not be in node A's list. To get around this, you could model it as such:
class Edge
{
Node incidentA;
Node incidentB;
}
class Node
{
int id;
}
Again, you'd have List and List of all the edges and nodes in the system. Of course analyzing this data structure would be done in a very different way than in the other approach.