Question: QUESTION 1 Is it feasible to implement any tree data structure using an array? a. Yes if we don't know how to use C++ pointers
QUESTION 1 Is it feasible to implement any tree data structure using an array? a. Yes if we don't know how to use C++ pointers or Java classes. b. Yes this would be feasible if we have a fast computer. c. This depends on the programming language we intend to use to implement the tree. d. No. Depending on how balanced the tree is, many unused empty slots may exist in the array. QUESTION 2 What to do when deleting a node with one child in a Binary Search Tree? a. Replace the deleted node with its child b. Replace the deleted node with the maximum node in the tree Oc Replace the deleted node with its smallest grandchild d. Keep the deleted node position empty QUESTION 3 In the worst-case scenario (big-D), what is the largest depth of a Binary tree with n nodes? O a. O(n) b.on2 + log(n) c. O(log(n)) d. On) T
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
