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

Method isBalanced

TreeBalancedBinaryTree.java:16–20  ·  view source on GitHub ↗
(TreeNode root)

Source from the content-addressed store, hash-verified

14 }
15
16 public boolean isBalanced(TreeNode root) {
17 if(maxDepth(root)==-1) return false;
18 return true;
19
20 }
21}
22

Callers

nothing calls this directly

Calls 1

maxDepthMethod · 0.95

Tested by

no test coverage detected