you give root binary tree n node node tree nodeval coin there n coin total treeIn choose adjacent node coin node a parent child child parentreturn minimum number move require node exactly coin Example 1input root 300output 2explanation from root tree coin leave child coin right childExample 2input root 030output 3explanation from left child root coin root take move then coin root tree right child ConstraintsThe number nod tree n1 n 1000 Nodeval nThe sum Nodeval n