TreeRoot ShiftingOn this pageRoot Shifting - Tree Data StructurePractice Problems834. Sum of Distances in Tree , Solution