SOLUTE Interview Question

Reverse the objects in the binary tree.

Interview Answer

Anonymous

May 2, 2019

void reverse(Node* root) { if(root == NULL) return; else return swap(reverse(root->left), reverse(root->right)) } then just make a swap function