Google interview question

binary trees/traversals and string manipulation