Consider the following lists of data.

Question

You can assume these represent a small sample of larger data sets:
List1: 3 16 13 9 15 12 2 10 14 8 7 1 6 4 11 … …

List2: 14 1 5 6 13 12 3 11 15 4 7 8 10 2 16 … …

Also consider the following processing tasks (Task1 and Task2) on the above lists:
Task1: Find data elements from list 1 that are also present on list 2.

Task2: Merge the two lists to remove duplicate values.

a) Outline in no more than TWO sentences why it is beneficial to sort the lists of data before carrying out Task1 above.
b) Describe using pseudocode how Task1 is processed using sorted lists of data.
c) Describe the Big O notation and briefly explain how, in this case, it indicates that using sorted data would increase the speed of processing of Task2.

Leave an answer

Sorry, you do not have permission to answer to this question .