Pregunta de entrevista de Amazon

Given a binary tree, how do you create a function that can swap the binary tree? (i.e. the left child becomes the right child and vice versa) From this function you just created, can you create another function that will swap the tree in Alternate level? (i.e. swap 1 level and then the next level does not swap)