Pergunta de entrevista da empresa Amdocs

input: a binary tree desired output: the same tree, but each node should have its left and right subtrees swapped.