Lesson 2.3.1b
2.3.1b Traversal of data structures and standard sorting, search and shortest-path algorithms Quiz: OCR Computer Science, Unit 8
20 questions
In partnership with Revision Ninja
Lesson 2.3.1b, Traversal of data structures and standard sorting, search and shortest-path algorithms: 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
-
What is the worst-case time complexity of a binary search on a sorted array?
- O(n)
- O(log n)
- O(n^2)
- O(1)
-
Which data structure is used to implement a Breadth-First Search on a graph?
- Linked list
- Array
- Queue
- Stack
-
Which tree traversal order visits the root node before visiting any child nodes?
- In-order
- Breadth-first
- Post-order
- Pre-order
-
What traversal of a Binary Search Tree outputs node values in ascending sorted order?
- Level-order
- Post-order
- In-order
- Pre-order
-
Which algorithm uses a heuristic function alongside path cost to find the shortest path?
- Breadth-first search
- Binary search
- Dijkstra's algorithm
- A* search
-
What is the average-case time complexity of the merge sort algorithm?
- O(log n)
- O(n^2)
- O(n log n)
- O(n)
-
Which tree traversal algorithm is commonly used to safely delete an entire binary tree?
- In-order
- Pre-order
- Breadth-first
- Post-order
-
Which search algorithm requires the dataset to be sorted before execution?
- Linear search
- Breadth-first search
- Binary search
- Depth-first search
-
Which data structure is primarily used to implement a Depth-First Search?
- Priority queue
- Queue
- Hash table
- Stack
-
What is the best-case time complexity of an insertion sort on an already sorted array?
- O(1)
- O(n log n)
- O(n^2)
- O(n)
-
Which algorithm calculates the shortest path from a starting node in a weighted graph?
- Binary search
- Bubble sort
- Kruskal's algorithm
- Dijkstra's algorithm
-
What is the worst-case time complexity of the quick sort algorithm?
- O(log n)
- O(n log n)
- O(n^2)
- O(n)
-
Which sorting algorithm repeatedly steps through a list, comparing and swapping adjacent items?
- Merge sort
- Bubble sort
- Binary insertion sort
- Quick sort
-
What is the worst-case time complexity of a linear search through an array?
- O(n)
- O(log n)
- O(n^2)
- O(1)
-
What sequence of operations defines a pre-order binary tree traversal?
- Right, Root, Left
- Left, Root, Right
- Left, Right, Root
- Root, Left, Right
-
Which algorithm approach breaks a sorting problem into smaller sub-problems before combining solutions?
- Backtracking
- Greedy approach
- Divide and conquer
- Dynamic programming
-
Which graph traversal algorithm explores all neighbours at the present depth before moving deeper?
- Breadth-First Search
- Depth-First Search
- Binary Search
- Linear Search
-
What sequence of operations defines a post-order binary tree traversal?
- Root, Left, Right
- Left, Root, Right
- Right, Left, Root
- Left, Right, Root
-
Which heuristic-based search algorithm is widely used in pathfinding for video game maps?
- Depth-first search
- Dijkstra's algorithm
- Linear search
- A* search
-
What is the worst-case space complexity of a recursive Depth-First Search call stack?
- O(h)
- O(1)
- O(n^2)
- O(2^n)
Related quizzes
- Algorithm design, suitability, efficiency and Big O notation Quiz · 2.3.1a · 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