Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Extend your program in exam.lua to also do the following: Opens a text file called graph.txt which contains values to be inserted in an AVL
Extend your program in exam.lua to also do the following: Opens a text file called graph.txt which contains values to be inserted in an AVLtree datastructure in the following formato Value on a single lineo For example the file defining the tree above contains the following:AEIOUBCDYou may assume that values are single letters and that there are no duplicates Add support for the following two commands to your system:Sub question DescriptionQA Command: showchildrenParameters: letterBehaviour: The system must read a letter from the standard input stream and output all of thenodes which are children or grandchildren or great grandchildren etc. of that node in alphabeticorder If there are no children then None must be output.Expected output on test data with input B: A C DExpected output on test data with input C: DExpected output on test data with input O: I UExpected output on test data with input A: NoneQB Command: insertParameters: letterBehaviour: The system must read a letter from the standard input stream, insert that value into thetree, restore the AVL property, then output the nodes in the order they would be reached by abreadth first traversalExpected output on test data with input Z:EB OA C I UD Z
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started