1120. Maximum Average Subtree

Given the root of a binary tree, find the subtree with the maximum average value. Return this maximum average value.

The average of a subtree is defined as (sum of all node values in the subtree) / (number of nodes in the subtree).

Examples
Input: [5,6,1]
Output: 6
Hints
Related Problems

1120. Maximum Average Subtree

Given the root of a binary tree, find the subtree with the maximum average value. Return this maximum average value.