Binary tree. Write one method in Java. My code seems to be wrong. So the task is:
Fantastic news! We've Found the answer you've been seeking!
Question:
Binary tree. Write one method in Java. My code seems to be wrong. So the task is:
A binary tree is "lucky" if it contains at least 3 occurrences of some value. Make a method called luckyTree that checks to see if the given value occurs at least three times. If the tree is "lucky", return true; otherwise, return false.
So one method should be the main one, where the recursion occurs. Helper method should be implemented. Here is my sample code, can you please correct it? Should be easy.
Related Book For
Business Communication Essentials a skill based approach
ISBN: 978-0132971324
6th edition
Authors: Courtland L. Bovee, John V. Thill
Posted Date: