You are given the root of a binary tree with n nodes, where each node contains Node.val coins. There are n coins in total across the entire tree.
In a single move, you can select two adjacent nodes and transfer exactly
Return the minimum number of moves required such that every node has exactly
Constraints:
The number of nodes in the tree is n.
n
Node.val n
The sum of all Node.val is n.
You are given the root of a binary tree with n nodes, where each node contains Node.val coins. There are n coins in total across the entire tree.
In a single move, you can select two adjacent nodes and transfer exactly
Return the minimum number of moves required such that every node has exactly
Constraints:
The number of nodes in the tree is n.
n
Node.val n
The sum of all Node.val is n.