rewrite leetcode implement symmetric tree