Question d’entretien chez Morgan Stanley

Write a method that can reverse a binary tree (mirroring).

Réponse à la question d'entretien

Utilisateur anonyme

23 févr. 2014

recurse over each node: switching both left and rights of a node, and calling your function again on both child nodes (checking for nulls first)