Lesson 1.4.2

1.4.2 Arrays, records, lists, graphs, stacks, queues, trees and hash tables Quiz: OCR Computer Science, Unit 4

20 questions

In partnership with Revision Ninja

Lesson 1.4.2, Arrays, records, lists, graphs, stacks, queues, trees and hash tables: 20 multiple choice questions for the OCR Computer Science (H446), Unit 4: Data types, data structures and 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 data structure uses a fixed size and indexed elements stored in contiguous memory locations?

    • Array
    • Linked list
    • Queue
    • Hash table
  2. Which data structure is immutable, meaning its elements cannot be modified after creation?

    • List
    • Array
    • Tuple
    • Record
  3. Which abstract data type operates on a Last-In, First-Out (LIFO) principle?

    • Graph
    • Queue
    • Tree
    • Stack
  4. Which data structure operates on a First-In, First-Out (FIFO) principle?

    • Queue
    • Binary tree
    • Hash table
    • Stack
  5. What prevents space waste in a fixed-size queue when items are repeatedly added and removed?

    • Circular queue
    • Static array
    • Linear queue
    • Priority queue
  6. Which operation adds a new item onto the top of a stack data structure?

    • Enqueue
    • Pop
    • Push
    • Dequeue
  7. Which operation removes and returns the front item from a queue data structure?

    • Enqueue
    • Pop
    • Dequeue
    • Push
  8. What term describes a graph connection that has a specific start and end node direction?

    • Adjacency matrix
    • Undirected edge
    • Weighted vertex
    • Directed edge
  9. In a binary search tree, where must values smaller than a node be located?

    • Left subtree
    • Parent node
    • Root node
    • Right subtree
  10. What occurs when a hash function generates the same index for two different keys?

    • Hash collision
    • Underflow
    • Null pointer
    • Hash overflow
  11. What value indicates that the pointer at the end of a linked list points nowhere?

    • False
    • Null
    • Void
    • Zero
  12. What is the top node of a tree data structure called?

    • Root
    • Leaf
    • Parent
    • Branch
  13. Which structure uses a two-dimensional array to record edges between vertices in a graph?

    • Hash table
    • Pointer array
    • Adjacency list
    • Adjacency matrix
  14. Which collision resolution method places colliding items into a linked list at that index?

    • Double hashing
    • Separate chaining
    • Open addressing
    • Linear probing
  15. How many total elements can be stored in a 3D array of size 3x4x2?

    • 48
    • 9
    • 24
    • 14
  16. Which data structure contains a fixed set of fields, potentially of different data types?

    • Tuple
    • Array
    • List
    • Record
  17. Which tree traversal visits the root node before visiting its left and right subtrees?

    • In-order
    • Pre-order
    • Post-order
    • Breadth-first
  18. Which characteristic distinguishes a dynamic data type from a static data type?

    • Immutable elements
    • Variable memory size
    • Fixed memory size
    • Faster access time
  19. Which queue variation dequeues elements based on an assigned importance value rather than arrival order?

    • Linear queue
    • Circular queue
    • Double-ended queue
    • Priority queue
  20. What is a node in a tree structure called if it has no child nodes?

    • Branch
    • Parent
    • Leaf
    • Root

All OCR Computer Science quizzes