My Blog List

[Leetcode Solution] Symmetric Tree

Analysis

  • Using BFS search each layer of binary tree from the root to leaf 
  • Validate if elements in each layer is symmetric
  • If all the layers are symmetric, then so is the tree

Note

Code


No comments:

Post a Comment

Enter you comment