Algorithms Trivia Questions

Explore the step-by-step methods that help computers solve problems, from sorting and searching to navigating networks. See how famous algorithms work and what makes them efficient.

35 questions · 10 per game

Algorithms trivia questions and answers

  1. Which sorting method repeatedly compares neighboring items and swaps them when they are out of order?

    Show answer

    Bubble sort

    Its simple passes can be easy to understand, but its worst-case running time grows quadratically with the number of items.

  2. Which sorting algorithm divides a list into smaller parts, sorts those parts, and then merges them?

    Show answer

    Merge sort

    Merge sort runs in O(n log n) time, and its stable behavior can preserve the order of equal-key items.

  3. Which sorting algorithm partitions items around a chosen pivot, then sorts the resulting sections?

    Show answer

    Quicksort

    Its average running time is O(n log n), though a poor sequence of pivots can lead to quadratic time.

  4. What search method repeatedly halves the remaining search interval and requires the data to be sorted?

    Show answer

    Binary search

    On a sorted array, it can find an item in O(log n) comparisons, even when the array is very large.

  5. What search method checks items in sequence until it finds a match or reaches the end?

    Show answer

    Linear search

    It works on unsorted data and needs no extra indexing structure, but may inspect every item.

How to play

  • • Each game has 10 questions. Before each one you see only a hint about its topic.
  • • Choose what it’s worth, from $1 to $20. Each value can only be used once per game.
  • • Type your answer. Small spelling mistakes are fine. Get it right and you win that amount.

Related categories