added solution to binary tree preorder traversal