Sollicitatievraag bij SOLUTE

Reverse the objects in the binary tree.

Antwoord op sollicitatievraag

Anoniem

2 mei 2019

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