Added iterative implementation of preorder traversal.