graph class
class Graph { public int vertices ; public List < int > [ ] edge ; public Graph ( int vertices ) { this . vertices = vertices ; edge = new List < int > [ vertices + 1 ] ; for ( int i = 0 ; i <= vertices ; i ++ ) { edge [ i ] = new List < int > ( ) ; } }