Question: P18. You have a sorted array, A, and an unsorted array, B. You need the data from A and B sorted together. Array A has

P18. You have a sorted array, A, and an unsorted array, B. You need the data from A and B sorted together. Array A has N elements and array B has M elements. You do the following Copy A in a third array, C. Insert (in the correct place) every element of B in C. You can assume C is large enough to hold both A and B. - - a) (6 points) Give the time complexity for this process. Justify your answer. b) (6 points) Give an example that shows the best case (use N = 6 and M-4). Give the values in A and 0(before the processing starts). Give the time complexity for your example (which may be different than your answer in part a)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
