Python Special Way for find() without HashSet  O(1) Space O(logn) Time
It\'s obvious to use BFS for the initial part. However, a lot of people use HashSet(set() in python) to pre-store all the values in the initial part, which may 
It\'s obvious to use `BFS` for the initial part. However, a lot of people use HashSet(`set()` in python) to pre-store all the values in the initial part, which may cause MLE when the values are huge. There is a special way to implement `find()` that  costs O(1) in space and O(logn) in time. \n\nFirstly, let\'s see what a complete tree will look like in this problem: \n\n\nIt\'s very easy to find that numbers in each layer range from `[2^i-1,2^(i+1)-2]`\nwhat if we add 1 to each number? Then it should range from `[2^i, 2^(i+1)-1]`\nSee?  the binary of all numbers in each layer should be: `100..00` to `111...11`\n\nHence we could discover that maybe we could use the `binary number` of `target+1` to find a path:\n\n![image](https://assets.leetcode.com/users/qingdu_river/image_1573968285.png)\n\nI\'m not proficient in English, so I would prefer to show my code here to explain my idea:\n\n```python\ndef find(self, target: int) -> bool:\n\t\tbinary = bin(target+1)[3:]                  # remove the useless first `1`\n        index = 0\n        root = self.root                                    # use a new pointer `root` to traverse the tree\n        while root and index <= len(binary): # traverse the binary number from left to right\n            if root.val == target:\n                return True\n            if  binary[index] == \'0\':  # if it\'s 0, we have to go left\n                root = root.left\n            else:  # if it\'s 1, we have to go right\n                root = root.right\n            index += 1\n        return False\n```
['Python3']