MCPcopy Create free account
hub / github.com/Blankj/awesome-java-leetcode / isBalanced

Method isBalanced

src/com/blankj/easy/_0110/Solution.java:15–17  ·  view source on GitHub ↗
(TreeNode root)

Source from the content-addressed store, hash-verified

13 */
14public class Solution {
15 public boolean isBalanced(TreeNode root) {
16 return helper(root) != -1;
17 }
18
19 private int helper(TreeNode node) {
20 if (node == null) return 0;

Callers 1

mainMethod · 0.95

Calls 1

helperMethod · 0.95

Tested by

no test coverage detected