Kotlinlearncs.online LogoJava
Return to List

Solve: Binary Tree Count Increasing

Created By: Pranav Narayanan
/ Version: 2025.2.0

Create a public class BinaryTreeCounter that provides a single class method named countIncreasing that accepts a single BinaryTree<Integer> and counts the number of nodes in the tree that have at least one child node and whose child nodes all have values strictly greater than their parent's value. If the passed tree is null, return 0.

For reference, cs125.trees.BinaryTree has the following public properties:

Related Lessons

Stuck? You may find these lessons helpful:

Report a Problem

Attribution must link to this page: https://www.learncs.online/solve/java/binary-tree-count-increasing/[email protected]