binary tree preorder traversal, recursive and iterative, leetcode