Blume Global interview question

Write an algorithm for traversing the tree.