Leetcode 7+8/Non-recursive tree traversal (pre + in + post)