Implementation and test of binary tree preorder traversal: recusrive & iterative