recursive solution for check symmetric tree