IXL Learning interview question

tree traversal