Honeywell interview question

write a program to traverse a tree and reverse direction ? ha ha ha