Question: 1. Pseudocode 2. Java code 3. Explain of number 2's output In a recent UOW-SIM orientation camp, there are m number of male students and
1. Pseudocode
2. Java code
3. Explain of number 2's output


In a recent UOW-SIM orientation camp, there are m number of male students and f number of female students. Unlike all previous orientation camps, where the number of male students, of different ages, is higher than the number of female students, this semester is the other way; that is f > m. The organizer of the camp would like to find out the ages among the students attending the camp that are common between both the female and male students. Device an efficient algorithm that runs on off + m) Ig f) complexity, to achieve the needs of the organizer, that is, describe an algorithm (in pseudocode) that runs on o(cf + m) lgf) to find out the ages that are common between both the female and male students. You may use the following two lists as reference when you design your algorithm. For example: Agefemale: 2018 23 21 19 22 17 Agemale: 18 18 23 20 Then, the output of your program should be 18, 20, and 23. a. Write a Java, C++, or Python program that implements the algorithm that you have come out with in Question 5 in Part A. 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.0 marks) b. Analyze the running time complexity of your program and include the analysis report as part of the deliverable for Question 6. (10.0 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
