Kotlinlearncs.online LogoJava
Return to List

Homework: BinaryTree Negative Sum

Created By: Geoffrey Challen
/ Version: 2021.10.0

Create a public class named BinaryTreeNegativeSum with a single class method named negativeSum. negativeSum accepts a BinaryTree<Integer>, that is a BinaryTree containing Integer values. Return the sum of all the negative values in the tree.

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

Related Lessons

Stuck? You may find these lessons helpful: