Q3
a. A binary search tree may be balanced or unbalanced based on the arrangement
of the nodes of the tree. With your knowledge in Binary search tree:

i. Explain the best and worst case scenarios of the time and space complexity of
both type of binary trees above.

b. A program accepts natural numbers N and M as inputs into an integer array A[ ]
and B[ ], each consisting of N and M of elements respectively. Sort the arrays A[ ]
and b[ ] in descending order of magnitude. Use the sorted array to generate a merged
array C[ ]. Array C[ ] should be generated in descending order. Assume the input
arrays comprise a maximum of 20 elements each, with no duplicates. Common
elements should be included in the merged array only once.
Using C++ or java implement the program above to achieve its stated requirements
above.

Respuesta :

Otras preguntas