To judge whether a tree is symmetric