adjacency graph for tree
int V = 8 ; vector < int > graph [ V ] ; graph [ 0 ] . push_back ( 1 ) ; graph [ 0 ] . push_back ( 2 ) ; graph [ 1 ] . push_back ( 3 ) ; graph [ 1 ] . push_back ( 4 ) ; graph [ 1 ] . push_back ( 5 ) ; graph [ 2 ] . push_back ( 5 ) ; graph [ 2 ] . push_back ( 6 ) ; graph [ 6 ] . push_back ( 7 ) ;