write a recursive algorithm to delete the leaves


Write a recursive algorithm to delete the leaves of a binary tree.

Programming Requirements

You must use the binary search tree code provided.  Each algorithm must be implemented as both a private method and a public method of the class.  Your code will be tested using the program provided.

Input

Use the input file provided, "input4.txt," to test your program.  You should also test other trees to make sure all configurations will pass the tests.

 

 

Program Output

Your output should match the sample output in "sample4.txt."

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: write a recursive algorithm to delete the leaves
Reference No:- TGS0221434

Expected delivery within 24 Hours