Question d’entretien chez Amazon

output binary tree by level