Preorder Iterative Algorithm