give binary tree root integer target delete leaf node value targetnote delete leaf node value target parent node leaf node value target delete need continue Example 1input root 1232null24 target 2output 1null3null4explanation Leaf nod green value target 2 remove Picture leave after remove new node leaf node value target 2 picture centerExample 2input root 13332 target 3output 13nullnull2example 3input root 12null2null2 target 2output 1explanation Leaf nod green value target 2 remove step ConstraintsThe number nod tree range 1 30001 Nodeval target 1000