Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
*/
14
public
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
main
Method · 0.95
Calls
1
helper
Method · 0.95
Tested by
no test coverage detected