PLEASE USE THIS CODE: import java.util.*; public class HW8_1 { public static void main(String[] args) { //
Fantastic news! We've Found the answer you've been seeking!
Question:
PLEASE USE THIS CODE: import java.util.*; public class HW8_1 { public static void main(String[] args) { // create a solution instance Solution sol = new Solution(); // create a random binary tree of your choice BSTNode tree = new BSTNode(3); tree.left = new BSTNode(0); tree.right = new BSTNode(0); // your solution method will be tested with // a random tree of your choice System.out.println(sol.distribute(tree)); // 2 } } // =============================================== // DO NOT MODIFY TREE BELOW THIS LINE // =============================================== class BSTNode { int val; BSTNode left; BSTNode right; BSTNode(int x) { val = x; } } // =============================================== // DO NOT MODIFY TREE ABOVE THIS LINE // =============================================== class Solution { // YOUR MAY ADD ANY GLOBAL VARIABLES, // HELPER METHODS, etc., in this class /** * PURPOSE: * PARAMETERS: * RETURN VALUES: */ public int distribute(BSTNode root) { // YOUR CODE HERE } }
Related Book For
Operations Management Processes And Supply Chains
ISBN: 9781292409863
13th Global Edition
Authors: Lee Krajewski, Naresh Malhotra, Larry Ritzman
Posted Date: