Lesson 2.3.1a

2.3.1a Algorithm design, suitability, efficiency and Big O notation Quiz: OCR Computer Science, Unit 8

20 questions

In partnership with Revision Ninja

Lesson 2.3.1a, Algorithm design, suitability, efficiency and Big O notation: 20 multiple choice questions for the OCR Computer Science (H446), Unit 8: Algorithms, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. Which Big O notation describes an algorithm whose execution time is independent of input size?

    • O(n)
    • O(1)
    • O(n^2)
    • O(log n)
  2. What is the worst-case time complexity of a linear search algorithm on n items?

    • O(log n)
    • O(1)
    • O(n)
    • O(n^2)
  3. Which condition must a dataset satisfy before a binary search can be performed?

    • Unique values
    • Fixed size
    • Even length
    • Sorted order
  4. What is the worst-case time complexity of the bubble sort algorithm?

    • O(n)
    • O(n^2)
    • O(2^n)
    • O(n log n)
  5. What is the auxiliary space complexity of a standard merge sort algorithm?

    • O(1)
    • O(n^2)
    • O(n)
    • O(log n)
  6. What does Big O notation specifically measure about an algorithm as input size grows?

    • Upper bound growth
    • Exact memory used
    • Exact execution time
    • Lower bound growth
  7. What is the worst-case time complexity of a binary search algorithm?

    • O(n)
    • O(log n)
    • O(n log n)
    • O(1)
  8. What is the worst-case time complexity of the quicksort algorithm?

    • O(n)
    • O(n^2)
    • O(n log n)
    • O(log n)
  9. An algorithm takes 5 ms for 1,000 items with O(n) complexity. How long for 2,000 items?

    • 5 ms
    • 10 ms
    • 25 ms
    • 20 ms
  10. An algorithm takes 2 ms for 100 items with O(1) complexity. How long for 1,000 items?

    • 10 ms
    • 200 ms
    • 2 ms
    • 20 ms
  11. Which algorithm is most efficient for searching a sorted array of one million items?

    • Binary search
    • Linear search
    • Bubble sort
    • Breadth-first search
  12. Which sorting algorithm is unsuitable when strict memory constraints require O(1) auxiliary space?

    • Merge sort
    • Bubble sort
    • Insertion sort
    • Selection sort
  13. Which complexity order represents the slowest execution time growth as n becomes very large?

    • O(2^n)
    • O(n^2)
    • O(n)
    • O(log n)
  14. What is the maximum number of key comparisons needed in a linear search of 50 items?

    • 6
    • 49
    • 50
    • 25
  15. What is the maximum number of comparisons for a binary search on 8 sorted items?

    • 3
    • 2
    • 8
    • 4
  16. What is the time complexity of an algorithm with two nested loops running n times each?

    • O(2n)
    • O(n^2)
    • O(n log n)
    • O(n)
  17. Which class of algorithms typically exhibits exponential time complexity, O(2^n)?

    • Linear search
    • Binary tree traversal
    • Brute-force recursive
    • Divide and conquer
  18. What term describes sacrificing increased RAM usage to achieve a faster algorithm execution speed?

    • Space-time trade-off
    • Optimization failure
    • Time complexity
    • Memory leak
  19. What is the simplified Big O complexity for an algorithm taking 3n^2 + 50n + 10 operations?

    • O(n^2)
    • O(50n)
    • O(n)
    • O(3n^2)
  20. What is the best-case time complexity of an insertion sort on an already sorted list?

    • O(n log n)
    • O(1)
    • O(n)
    • O(n^2)

All OCR Computer Science quizzes