LeetCode
Maximum Average Subtree
Click
here
for an explanation.