Affirm interview question

binary tree question about traversal