← Technology quizzes

Free practice quiz

Data Structures & Algorithms

15 questions Technology Grades 9-12

The question sheet

Reveal any answer as you study
  1. A ____ follows last-in, first-out (LIFO) order.

    • array
    • queue
    • tree
    • stack
    Reveal answer

    Answer: stack

  2. Which data structure follows FIFO order?

    • Hash table
    • Queue
    • Stack
    • Graph
    Reveal answer

    Answer: Queue

  3. What is the time complexity of binary search?

    • O(n²)
    • O(1)
    • O(n)
    • O(log n)
    Reveal answer

    Answer: O(log n)

  4. ____ store elements in contiguous memory for constant-time index access.

    • Arrays
    • Stacks
    • Linked lists
    • Graphs
    Reveal answer

    Answer: Arrays

  5. BFS uses a queue and explores level by level.

    • True
    • False
    Reveal answer

    Answer: True

  6. DFS uses a queue to explore as deeply as possible.

    • True
    • False
    Reveal answer

    Answer: False

  7. What complexity is typical of merge sort and quicksort?

    • O(n log n)
    • O(1)
    • O(log n)
    • O(n²)
    Reveal answer

    Answer: O(n log n)

  8. ____ stores results of subproblems to avoid repeating work.

    • Greedy
    • Dynamic programming
    • Hashing
    • Recursion
    Reveal answer

    Answer: Dynamic programming

  9. Which pattern tracks a range of elements for substring problems?

    • Two-pointer
    • Sliding window
    • Greedy
    • Recursion
    Reveal answer

    Answer: Sliding window

  10. Greedy algorithms make the locally best choice at each step.

    • True
    • False
    Reveal answer

    Answer: True

  11. What do hash tables provide on average?

    • Constant-time lookup
    • Sorted order
    • LIFO order
    • Level-by-level access
    Reveal answer

    Answer: Constant-time lookup

  12. A loop running one time too many is called an ____ error.

    • recursion
    • off-by-one
    • null
    • overflow
    Reveal answer

    Answer: off-by-one

  13. O(2ⁿ) represents exponential time complexity.

    • True
    • False
    Reveal answer

    Answer: True

  14. Which structure models networks of connected nodes?

    • Stacks
    • Graphs
    • Arrays
    • Queues
    Reveal answer

    Answer: Graphs

  15. What underlies divide-and-conquer strategies like merge sort?

    • Recursion
    • Two-pointer
    • Greedy
    • Hashing
    Reveal answer

    Answer: Recursion

Play the whole quiz inside a game Answers stay hidden while you play

Make your own — free

Turn any notes into a game in under a minute. Free to start.

Make a quiz