Function to perform tree pruning by performing post order traversal
Node * treePruning ( Node * root , vector < Node * > & result ) { if ( root == NULL ) return NULL ; root -> left = treePruning ( root -> left , result ) ; root -> right = treePruning ( root -> right , result ) ;