Atlassian interview question

A binary tree traversal problem.