✅ Three Simple Lines of Code
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)Code #1.1Time complexity:O(n2). Space complexity:O(n
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)

# Code #1.1
Time complexity: $$O(n^2)$$. Space complexity: $$O(n)$$.
```python3
FindElements = type('',(),{
    '__init__': lambda s,r:setattr(s,'d',(f:=lambda n,x:n and {x}|f(n.left,x*2+1)|f(n.right,x*2+2) or set())(r,0)),
    'find': lambda s,t:t in s.d
})
```

# Code #1.2 - Unwrapped
```python3
class FindElements:
    def __init__(self, r: Optional[TreeNode]):
        def f(n,x):
            if n:
                return {x}|f(n.left,x*2+1)|f(n.right,x*2+2)
            return set()

        self.d = f(r,0)

    def find(self, t: int) -> bool:
        return t in self.d
```

(Disclaimer 2: code above is just a product of fantasy packed into one line, it is not declared to be 'true' oneliners - please, remind about drawbacks only if you know how to make it better)
['Hash Table', 'Tree', 'Depth-First Search', 'Design', 'Binary Tree', 'Python', 'Python3']