Creating Adjacency list
vector < vector < int > > constructTree ( int n , vector < vector < int > > edges ) { vector < vector < int > > adjl ( n ) ; for ( auto e : edges ) { int u = e [ 0 ] ; int v = e [ 1 ] ; adjl [ u ] . push_back ( v ) ; adjl [ v ] . push_back ( u ) ; } return adjl ; }