Simple and clean C++ solution|| Using DFS and a HashSet
If you really found my solution helpful please upvote it, as it motivates me to post such kind of codes and help the coding community, if you have some queries 
**If you really found my solution helpful please upvote it, as it motivates me to post such kind of codes and help the coding community, if you have some queries or some improvements please feel free to comment and share your views.**\n\n```\n    unordered_set<int> s;\n    void solve(TreeNode* root)\n    {\n        if(root==nullptr)\n            return;\n        s.insert(root->val);\n        if(root->left!=nullptr)\n            root->left->val=root->val*2+1;\n        if(root->right!=nullptr)\n            root->right->val=root->val*2+2;\n        solve(root->left);\n        solve(root->right);\n    }\n    FindElements(TreeNode* root) {\n        root->val=0;\n        solve(root);\n    }\n    \n    bool find(int target) {\n        if(s.find(target)!=s.end())\n            return true;\n        else\n            return false;\n    }\n```
['Depth-First Search', 'C', 'C++']