Construct a binary tree for the numbers 3,4,5,6,7,8,9. Then for each number input taken at runtime, show the number of iterations required to reach that node from root node containing the target number. (10) 2. Construct a binary tree with the following keys as strings a. Desktop, CSU, Spring2022, CIS260, CIS 265, Vacation, Hackathon Your first task is to put this data in an array of string and search for a folder name. Let us say that the folder name is “Hackathon”. Using the array subscript, how many iterations does it take to find the folder? (10) Next, convert this array into a Binary tree and arrange in alphabetical order, and try to find the same folder. List the number of Iterations.(10) Bonus: Now replace the folder names with file contents. So you need a File class where there is a filename variable and file content variable, both should be strings. So the node would have file object instead of just names. So you have an array of File class objects, so the binary tree will have file names and they will have pointers to indexes in the array (3) (activity done In Java code please)
1. Construct a binary tree for the numbers 3,4,5,6,7,8,9. Then for each number input taken at runtime, show the number of iterations required to reach that node from root node containing the target number. (10) 2. Construct a binary tree with the following keys as strings a. Desktop, CSU, Spring2022, CIS260, CIS 265, Vacation, Hackathon Your first task is to put this data in an array of string and search for a folder name. Let us say that the folder name is “Hackathon”. Using the array subscript, how many iterations does it take to find the folder? (10) Next, convert this array into a Binary tree and arrange in alphabetical order, and try to find the same folder. List the number of Iterations.(10) Bonus: Now replace the folder names with file contents. So you need a File class where there is a filename variable and file content variable, both should be strings. So the node would have file object instead of just names. So you have an array of File class objects, so the binary tree will have file names and they will have pointers to indexes in the array (3) (activity done In Java code please)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images