Driver Code
int main ( ) { int N = 6 ; add_edge ( 0 , 1 ) ; add_edge ( 1 , 2 ) ; add_edge ( 0 , 3 ) ; add_edge ( 3 , 4 ) ; add_edge ( 3 , 5 ) ; vector < int > val = { 4 , 3 , 5 , 1 , 0 , 2 } ; solve ( N , val ) ; return 0 ; }