Question d’entretien chez Amazon

write a function that prints out the strings in a binary tree and then recreate the binary tree from the string.