Adjacency list containing list of children
static List < List < int > > adj ; public GFG ( int N ) { this . N = N ; adj = new List < List < int > > ( N ) ; for ( int i = 0 ; i < N ; i ++ ) adj . Add ( new List < int > ( ) ) ; }