Blume Global Interview Question

Write an algorithm for traversing the tree.