Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
a. (3 marks) What ADT would you use to store this data? Justify your choice.
b. (3 marks) How does your choice handle retrieving a movie based on the
time? Explain this with reference to Big O time complexity.
b) A university wants to set up a student peer tutoring system. The system needs to
keep track of which students are tutoring other students. There are plans for this
system to operate globally with students helping each other learn internationally so it
needs to be able to support a large number of students. Any student can tutor any
other student and some students are both tutors and learners. The students can also
rate each other’s tutoring ability. The university also wants to do research into the
structure of these student tutoring networks.
a. (4 marks) What ADT would you use to store this data? Justify your choice.
Question 2 (Total 20 marks): Sorting and Recursion
a) (3 marks). If you had to use a sorting algorithm in a low memory environment, what
would be the most important factor to consider? Would a mergesort be an
appropriate choice? Justify your answer.
b) (5 marks). Do you agree with the statement: “The best pivot to select for a
quicksort is the median of all the values.”? Justify your answer with reference to Big
O time complexity.
c) (3 marks). What kind of problems could occur when recursively sorting very large
datasets? Can this be mitigated, or should a different algorithm be used?
d) (5 marks). Rewrite the following recursive algorithm as an iterative one.