Yahoo interview question

Tree traversal, string manipulation