Question: Question 6 ( 3 0 . 0 marks ) Given two unsorted arrays A and B . Array A consists of numbers of integers and

Question 6(30.0 marks)Given two unsorted arrays A and B. Array A consists of numbers of integers and array B consists of numbers of integers. The integers in array B are distinct and they are in the range 1. The problem is to output the [] smallest number in array , for 1, and . For example, let =[7,3,8,21,5,11] and =[3,5,1], then the output is [3,7,11] because the sorted array of the elements in array A is [3,5,7,8,11,21] and the first (1st) smallest element of array A is 3, the 3rd smallest element of array A is 7, and the 5th smallest element of array A is 11.Write two Java, C++, or Python programs to implement the following algorithms:a) Algorithm 1. Sort array A and Array B and produce the required output.(10 marks)b) Write a report on the analysis of your implementation for Algorithm 1, using thetechnique we discussed in Lecture 1(Slides 2437). How much time (number ofoperations) does Algorithm 1 take? (3 marks)c) Algorithm 2. Sort array A but do not sort array B. Produce the required output.(10 marks)d) Write a report on the analysis of your implementation for Algorithm 1, using thetechnique we discussed in Lecture 1(Slides 2437). How much time (number ofoperations) does Algorithm 2 take?(3 marks)e) Test run your program, screen-capture the output, and submit together with yourreports for Part 8(b) and 8(d).(4 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!