Toggle navigation
Code Exercises
Interview Planner
Interview Guide
Practice Now
Blog
About
Easy
Moderate
Challenging
Longest Palindrome in Word
Longest Common Sequence
Largest Prime Factor
Package Rice Bags (part 2)
Perfect Binary Tree Check
Complete Binary Tree Check
Perfect Binary Tree Check
A binary tree is perfect when all levels are complete.
Write a method that checks if a binary tree is perfect.
TreeNode API methods: node.left() and node.right().
public Boolean isPerfectTree(TreeNode node) {
}
Submit
Clear
Solution