Skip to content

Latest commit

 

History

History

Check if Tree is Symmetry or Not

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Given a binary tree, check whether it is a mirror of itself.

 this binary tree is symmetric:

     1
   /   \
  2     2
 / \   / \
3   4 4   3
But the following is not:

    1
   / \
  2   2
   \   \
   3    3