' data ' is input . We need to reverse path from root to data . ' level ' is current level . ' temp ' that stores path nodes . ' nextpos ' used to pick next item for reversing .
Node * reverseTreePathUtil ( Node * root , int data , map < int , int > & temp , int level , int & nextpos ) {