init solution of non-recursive in-order traversal