Google interview question

a custom tree preorder traversal a bst making using hashmap