Toggle navigation
Code Exercises
Interview Planner
Interview Guide
Practice Now
Blog
About
Easy
Moderate
Challenging
Fizz Buzz
Prime Number
Fibonacci Number
Palindrome Check
Even Fibonacci Sum
Greatest Common Divisor
Package Rice Bags
Filter Strings (Java 8 Lambdas and Streams)
Comma Separated (Java 8 Lambdas and Streams)
Ceasar Cipher
Strict Binary Tree Check
Two Sum (Pair with a Given Sum)
Strict Binary Tree Check
A binary tree is strict when all nodes have either two or zero child nodes.
Write a method that checks if a binary tree is strict.
TreeNode API methods: node.left() and node.right().
public Boolean isStrictTree(TreeNode node) {
}
Submit
Clear
Solution