LeetCode

Sum of Distances in Tree

Click here for an explanation.