Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi! There are a total of 3 parts to this question. I would like to have everything done in JAVA for both the pseudocode and

Hi! There are a total of 3 parts to this question. I would like to have everything done in JAVA for both the pseudocode and coding part. Firstly, I need to sort the Age male array using QUICKSORT, then loop through the Age female using BINARY SEARCH, then print out their common age. Lastly, i would like to have an analysis report on the running time complexity. image text in transcribed
Part B: (30 marks) Algorithm and its implementation (programming) Question 6 (5.0 marks) In a recent UOW-SIM orientation camp, there are m number of male students and f number of female students. Like all previous orientation camps, the number of male students, of different ages, is higher than the number of female students; that is m > f. The organizer of the camp would like to find out the ages among the students attending the camp that are common between both the male and female students. Device an efficient algorithm that runs on 0((m+f) Ig m) complexity, to achieve the needs of the organizer, that is, describe an algorithm (in pseudocode) that runs on O((m+) Igm) to find out the ages that are common between both the male and female students. You may use the following two lists as reference when you design your algorithm. For example: pseudocode in JAVA in the form of: Agemale: 21 19 24 22 20 23 18 0 Quicksurt the Age male (mly m) Agefemale: 17 17 22 19 loop through Age female using Binary Search (flg m) Then, the output of your program should be 22, 19. Bennt the common age (5 marks) Question 7 (25.0 marks) Write the Java code based on the above pseudo you'e written a. Write a Java program that implements the algorithm that you have come out with in Question 6. You may use existing codes for quicksort algorithm or binary-search algorithm that meet the specified criteria (that is, m log m and log m run-time complexity respectively). Alternatively, you can write your own quicksort and binary-search algorithms. (20 marks) b. Analyze the running time complexity of your program, and include the analysis report as part of the deliverable for Question 7

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions