Input Format–>On each exercise, your program must accept the input data, from file which its name given in program argument list, plotted as a binary tree in Figure 1, as the following format: 5 4 8 11 – 13 4 7 2 – – – – – 1

Input Format–>On each exercise, your program must accept the input data, from file which its name given in program argument list, plotted as a binary tree in Figure 1, as the following format: 5 4 8 11 – 13 4 7 2 – – – – – 1

hyphen refers to no node. There is one space between each value.

Output Format–>You must write your solution to output file which its name given in program argument list. In first exercise, true or false.

In second exercise; according to given example;

T[0]+T[1]+T[3]+T[8]=22

Run Format–>Your program must be compiled with no error and run as intended, when below commands written in terminal.

$javac Balanced.java

$java Balanced inputfile path outputfile path

$javac Path.java

$java Path inputfile path outputfile path

You may also like...