Add solution to binary tree preorder traversal