International Olympiad in Informatics (IOI)

Welcome to the International Olympiad in Informatics (IOI) Quiz! Test your knowledge on algorithms, data structures, and problem-solving techniques used in competitive programming.

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the maximum number of edges in a tree with n nodes?

  1. n-1
  2. n
  3. n+1
  4. 2n-1
Question 2 Multiple Choice (Single Answer)

Which of the following sorting algorithms has the best worst-case time complexity?

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Merge Sort
Question 3 Multiple Choice (Single Answer)

What is the most efficient data structure for storing a collection of unique elements and quickly checking if an element is present?

  1. Array
  2. Linked List
  3. Hash Table
  4. Tree
Question 4 Multiple Choice (Single Answer)

Which of the following algorithms is used to find the shortest path between two nodes in a weighted graph?

  1. Dijkstra's Algorithm
  2. Bellman-Ford Algorithm
  3. Floyd-Warshall Algorithm
  4. Kruskal's Algorithm
Question 5 Multiple Choice (Single Answer)

What is the time complexity of finding the minimum element in an unsorted array using a linear search?

  1. O(1)
  2. O(log n)
  3. O(n)
  4. O(n^2)
Question 6 Multiple Choice (Single Answer)

Which of the following is a greedy algorithm?

  1. Dijkstra's Algorithm
  2. Prim's Algorithm
  3. Kruskal's Algorithm
  4. Traveling Salesman Problem
Question 7 Multiple Choice (Single Answer)

What is the name of the algorithm used to find all possible subsets of a set?

  1. Breadth-First Search
  2. Depth-First Search
  3. Backtracking
  4. Dynamic Programming
Question 8 Multiple Choice (Single Answer)

Which of the following is a dynamic programming problem?

  1. Longest Common Subsequence
  2. Knapsack Problem
  3. Traveling Salesman Problem
  4. Dijkstra's Algorithm
Question 9 Multiple Choice (Single Answer)

What is the name of the algorithm used to find the maximum flow in a network?

  1. Ford-Fulkerson Algorithm
  2. Edmonds-Karp Algorithm
  3. Dinic's Algorithm
  4. Push-Relabel Algorithm
Question 10 Multiple Choice (Single Answer)

Which of the following is a non-deterministic algorithm?

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Monte Carlo Simulation
Question 11 Multiple Choice (Single Answer)

What is the name of the algorithm used to find the convex hull of a set of points?

  1. Graham's Scan
  2. Jarvis's March
  3. QuickHull
  4. Gift Wrapping Algorithm
Question 12 Multiple Choice (Single Answer)

Which of the following is a divide-and-conquer algorithm?

  1. Merge Sort
  2. Quick Sort
  3. Heap Sort
  4. Radix Sort
Question 13 Multiple Choice (Single Answer)

What is the name of the algorithm used to find the minimum spanning tree in a weighted graph?

  1. Prim's Algorithm
  2. Kruskal's Algorithm
  3. Dijkstra's Algorithm
  4. Bellman-Ford Algorithm
Question 14 Multiple Choice (Single Answer)

Which of the following is a sorting algorithm that works by repeatedly swapping adjacent elements?

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Merge Sort
Question 15 Multiple Choice (Single Answer)

What is the name of the algorithm used to find the shortest path between two nodes in an unweighted graph?

  1. Breadth-First Search
  2. Depth-First Search
  3. Dijkstra's Algorithm
  4. Bellman-Ford Algorithm