Time Complexity Basics (2 marks)
What does the term ‘time complexity’ tell you about an algorithm and why is it important to know the time complexity when comparing two algorithms?
Time Complexity Basics (2 marks) Read More »
What does the term ‘time complexity’ tell you about an algorithm and why is it important to know the time complexity when comparing two algorithms?
Time Complexity Basics (2 marks) Read More »
If you have a large database and need to find records quickly, would you choose a linear search or a hashed search method? Explain your answer.
Efficient Search in a Database (3 marks) Read More »
If you have a sorted list and you need to find a specific item, would you choose a linear search or a binary search? Explain your choice.
Search Algorithm Selection (2 marks) Read More »
A developer used two different sorting algorithms to arrange a list of numbers in ascending order. Algorithm A is a selection sort (time complexity of O(n^2)), and Algorithm B is a quicksort (time complexity of O(n log n)). Which algorithm is likely to be more time-efficient for sorting large datasets and why?
Algorithm Efficiency Analysis (2 mark) Read More »
Explain why an iterative algorithm might be more time-efficient than a recursive algorithm for calculating numbers in a sequence.
Algorithm Efficiency Understanding (2 marks) Read More »