Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions