Question 20 Create a BST by adding the following elements one by one: 10, 4, 3, 5, 11, 12 -- DO NOT draw the tree. Inste
Posted: Fri May 20, 2022 4:55 pm
Question 20 Create a BST by adding the following elements one by one: 10, 4, 3, 5, 11, 12 -- DO NOT draw the tree. Instead, show the tree using the following approaches: a. Present the tree with the 1-D array that only stores key values (Use "," to separate elements, "X" to indicate a blank element in the array, DO NOT use space in your presentation) (1 point) b. Present the tree with the 2-D array that stores both key values as well as indexes (Please use the format below to show your answer) (3 points). Below is the format for subquestion b you must use: (index, key, left, right) Use a separate line for each element in the tree. For example: I may have a tree that's represented partially below: (0, X, 1, 2) (1, Y, 3, 4)... Please put the sub-question number in the front of your answer to indicate the question you are answering.