Algorithms and programming June 2023, Question 7 26 marks
7* (a) A program designer needs to decide on an algorithm to use from a choice of three. The table shows the worst-case Big O complexities for each algorithm.
| Algorithm | Time Complexity | Space Complexity |
| 1 | Linear | Exponential |
| 2 | Exponential | Constant |
| 3 | Logarithmic | Logarithmic |
The program will be used to analyse data that can range from 2 items to 2 billion items.
Compare the use of all three algorithms and suggest which the programmer should use.
You should include the following in your answer:
• the meaning of constant, logarithmic, linear and exponential complexity
• how well each algorithm scales as the amount of data increases
• which algorithm is the most suitable for the given task.
Reveal mark scheme
The program designer is investigating the use of concurrent processing.
Describe what is meant by the term ‘concurrent processing’.
Reveal mark scheme
Give two benefits of using concurrent processing.
Reveal mark scheme
The programmer needs to use a merge sort in one part of the problem to sort items in ascending order.
Describe how a merge sort works.
Reveal mark scheme
Give one benefit and one drawback of the programmer using a merge sort instead of a bubble sort.
Reveal mark scheme
The programmer uses an Integrated Development Environment (IDE).
Complete the table by identifying and describing three IDE features that can help the programmer to develop, or debug a program.
Reveal mark scheme