Question: The format of the input file will be Insert: 9 8 Insert: 6 7 Insert: 5 5 Insert: 4 5 PrintTree Delete: 8 4 Delete:
The format of the input file will be
Insert:
Insert:
Insert:
Insert:
PrintTree
Delete:
Delete:
Contains:
FindMin
FindMax
PrintTree
Height
Size
Insert:
Insert:
Insert:
PrintTree
Insert:
Insert
hih
Insert and Delete will be followed by : semicolon and the key to be inserted. You have to check for validity of the key as well as the line in the file. PrintTree corresponds to toString method in the class. All commands are case sensitive
The corresponding correct output file will be
True
True
True
True
False
True
False
True
True
Error in insert: IllegalArgumentException raised
Error in insert: IllegalArgumentException raised
Error in Line: Insert
Error in Line: hih
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
