MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / isSymmetric

Method isSymmetric

TreeSymmetricBinaryTree.java:3–7  ·  view source on GitHub ↗
(TreeNode root)

Source from the content-addressed store, hash-verified

1class Solution {
2
3 public boolean isSymmetric(TreeNode root)
4 {
5 if(root==null) return true;
6 return symmetric(root.left,root.right);
7 }
8
9 public boolean symmetric(TreeNode root1, TreeNode root2)
10 {

Callers

nothing calls this directly

Calls 1

symmetricMethod · 0.95

Tested by

no test coverage detected