Domanda di colloquio di SOLUTE

Reverse the objects in the binary tree.

Risposta di colloquio

Anonimo

2 mag 2019

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