Given the root of a perfect binary tree, reverse the node values at each odd level of the tree.Return the root of the reversed tree.A binary tree is perfect if all parent nodes have two children and all leaves are on the same level.To reverse the values on odd levels, a single-traversal solution without any extra space is implemented using pre-order traversal.