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.
The 20 questions
-
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)
-
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)
-
Which condition must a dataset satisfy before a binary search can be performed?
- Unique values
- Fixed size
- Even length
- Sorted order
-
What is the worst-case time complexity of the bubble sort algorithm?
- O(n)
- O(n^2)
- O(2^n)
- O(n log n)
-
What is the auxiliary space complexity of a standard merge sort algorithm?
- O(1)
- O(n^2)
- O(n)
- O(log n)
-
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
-
What is the worst-case time complexity of a binary search algorithm?
- O(n)
- O(log n)
- O(n log n)
- O(1)
-
What is the worst-case time complexity of the quicksort algorithm?
- O(n)
- O(n^2)
- O(n log n)
- O(log n)
-
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
-
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
-
Which algorithm is most efficient for searching a sorted array of one million items?
- Binary search
- Linear search
- Bubble sort
- Breadth-first search
-
Which sorting algorithm is unsuitable when strict memory constraints require O(1) auxiliary space?
- Merge sort
- Bubble sort
- Insertion sort
- Selection sort
-
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)
-
What is the maximum number of key comparisons needed in a linear search of 50 items?
- 6
- 49
- 50
- 25
-
What is the maximum number of comparisons for a binary search on 8 sorted items?
- 3
- 2
- 8
- 4
-
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)
-
Which class of algorithms typically exhibits exponential time complexity, O(2^n)?
- Linear search
- Binary tree traversal
- Brute-force recursive
- Divide and conquer
-
What term describes sacrificing increased RAM usage to achieve a faster algorithm execution speed?
- Space-time trade-off
- Optimization failure
- Time complexity
- Memory leak
-
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)
-
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)
Related quizzes
- Traversal of data structures and standard sorting, search and shortest-path algorithms Quiz · 2.3.1b · 20 questions
- Processor components: ALU, control unit, registers and buses Quiz · 1.1.1a · 20 questions
- Operating systems and memory management Quiz · 1.2.1a · 20 questions
- Compression, encryption and hashing Quiz · 1.3.1 · 20 questions
- Primitive data types and binary number representation Quiz · 1.4.1a · 20 questions
- Data Protection Act 1998 and Computer Misuse Act 1990 Quiz · 1.5.1a · 20 questions
- The nature and need for abstraction and abstract models Quiz · 2.1.1 · 20 questions
- Programming constructs, recursion and variable scope Quiz · 2.2.1a · 20 questions
- Fetch-decode-execute, CPU performance, pipelining and architectures Quiz · 1.1.1b · 20 questions
- Interrupts, scheduling, OS types, BIOS, device drivers and virtual machines Quiz · 1.2.1b · 20 questions