Beats 99%.  Dawgs ts is heat. DFS and Set bruzz feel me?
Code
# Code
```java []
class FindElements {

    Set<Integer> found;
    public FindElements(TreeNode root) {
        found = new HashSet<>();
        dfs(root,0);
    }
    
    public boolean find(int target) {
        return found.contains(target);
    }

    public void dfs(TreeNode curr, int currVal){
        if(curr == null) return;
        found.add(currVal);
        dfs(curr.left,currVal * 2 + 1);
        dfs(curr.right,currVal * 2 + 2);
    }
}

```
['Java']