Python Solution : DFS + Hashmap
Intuition
Do a DFS on tree
Get all values in a hashmap
Complexity

Time complexity:0(N)


Space complexity:O(N)

Code
# Intuition
1. Do a DFS on tree
2. Get all values in a hashmap


# Complexity
- Time complexity:
0(N)

- Space complexity:
O(N)

# Code
```python3 []
# Definition for a binary tree node.
# class TreeNode:
#     def __init__(self, val=0, left=None, right=None):
#         self.val = val
#         self.left = left
#         self.right = right
class FindElements:

    def get_all_values(self,root,val):
        if root:
            self.hash_map[val]=1
            self.get_all_values(root.left,val*2+1)
            self.get_all_values(root.right,val*2+2)

    def __init__(self, root: Optional[TreeNode]):
        self.hash_map={}
        self.get_all_values(root,0)
        
    
    def find(self, target: int) -> bool:
        if self.hash_map.get(target,False):
            return True
        return False
        


# Your FindElements object will be instantiated and called as such:
# obj = FindElements(root)
# param_1 = obj.find(target)
```
['Hash Table', 'Python3']