Easy Java Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode() {}\n *     TreeNode(int val) { this.val = val; }\n *     TreeNode(int val, TreeNode left, TreeNode right) {\n *         this.val = val;\n *         this.left = left;\n *         this.right = right;\n *     }\n * }\n */\nclass FindElements {\n\n    TreeNode root;\n\n    static void recover(TreeNode root){\n        if(root==null) return;\n\n        int x = root.val;\n        if(root.left!=null) root.left.val = 2*x+1;\n        if(root.right!=null) root.right.val = 2*x+2;\n        recover(root.left);\n        recover(root.right);\n    }\n\n    static boolean check(TreeNode root, int a){\n        if(root==null) return false;\n        if(root.val==a) return true;\n\n        return check(root.left,a) || check(root.right,a);\n    }\n\n    public FindElements(TreeNode x) {\n        root = x;\n        root.val = 0;\n        recover(root);\n    }\n    \n    public boolean find(int target) {\n        return check(root,target);\n    }\n}\n\n/**\n * Your FindElements object will be instantiated and called as such:\n * FindElements obj = new FindElements(root);\n * boolean param_1 = obj.find(target);\n */\n```
['Java']