Question d’entretien chez Amazon

invert a binary tree and return its root