update the solution for symmetric tree.