Adjacency list representation of graph
class Graph { int V ; Vector < Integer > [ ] adj ; Graph ( int V ) { this . V = V ; this . adj = new Vector [ V ] ; for ( int i = 0 ; i < V ; i ++ ) adj [ i ] = new Vector < Integer > ( ) ; }