Function to perform the DFS Traversal that returns the subtree of node in sorted manner
vector < int > help ( vector < int > tree [ ] , int x , int p , vector < int > & c , vector < int > & sol ) { vector < int > res ; res . push_back ( c [ x ] ) ;