permutation
preorder tree iterative version