Yahoo interview question

print out every tree node in a pre-order traverse.