C++ Easy To Implementation
class FindElements {\npublic:\n\n    sets;\n    void solve(TreeNode root)\n    {\n          if(root)\n          {\n             int x=root->val;\n             i
class FindElements {\npublic:\n\n    set<int>s;\n    void solve(TreeNode *root)\n    {\n          if(root)\n          {\n             int x=root->val;\n             if(root->left)\n             {\n               root->left->val=2*x+1;\n               s.insert(2*x+1);\n               solve(root->left);\n             }\n            if(root->right)\n            {\n              root->right->val=2*x+2;\n              s.insert(2*x+2);\n              solve(root->right);\n            }\n          }\n    }\n    FindElements(TreeNode* root) {\n         root->val=0;\n         s.insert(0);\n         solve(root);\n    } \n    \n    bool find(int t) {\n        if(s.find(t)!=s.end())\n          return true;\n      return false;\n    }\n};
['Depth-First Search', 'Recursion', 'C', 'Ordered Set']