give binary tree follow rulesrootval 0if treeNodeval x treeNodeleft null treeNodeleftval 2 x 1if treeNodeval x treeNoderight null treenoderightval 2 x 2now binary tree contaminate mean treeNodeval change 1implement findelement classfindelementstreenode root Initializes object contaminate binary tree recover itbool findint target return true target value exist recover binary tree Example 1inputfindelementsfindfind1null112outputnullfalsetrueexplanationfindelements findelement new findelements1null1 findelementsfind1 return false findelementsfind2 return True Example 2inputfindelementsfindfindfind11111135outputnulltruetruefalseexplanationfindelements findelement new FindElements11111findElementsfind1 return TruefindElementsfind3 return TruefindElementsfind5 return FalseExample 3inputfindelementsfindfindfindfind1null11null12345outputnulltruefalsefalsetrueexplanationfindelements findelement new findelements1null11null1findelementsfind2 return TruefindElementsfind3 return falsefindelementsfind4 return FalsefindElementsfind5 return true ConstraintsTreeNodeval 1the height binary tree equal 20the total number nod 1 104total call find 1 1040 target 106