Question d’entretien chez Rivian

Develop an algorithm to reverse a binary tree.