Question: Please use Java to code Part B: (30 marks) Algorithm and its implementation (programming) Question 6 (5.0 marks) In a recent UOW-SIM orientation camp, there

Please use Java to code

Please use Java to code Part B: (30 marks) Algorithm and its

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 0((m+f) 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: Agemale: 21 19 24 22 20 23 18 Agefemale: 17 17 22 19 Then, the output of your program should be 22, 19. (5 marks) Question 7 (25.0 marks) 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

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!