give nonempty special binary tree consist node nonnegative value node tree exactly zero subnode if node subnode node value small value subnode More formally property rootval minrootleftval rootrightval holdsgiven binary tree need output second minimum value set node value treeIf second minimum value exist output 1 instead example 1input root 225nullnull57output 5explanation the small value 2 second small value 5Example 2input root 222output 1explanation the small value 2 is not second small value ConstraintsThe number nod tree range 1 251 Nodeval 231 1rootval minrootleftval rootrightval internal node tree