Computer Science Theory

This quiz covers fundamental concepts and theories in computer science, including algorithms, data structures, complexity analysis, and automata theory.

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which sorting algorithm has a worst-case time complexity of O(n^2) but a best-case time complexity of O(n)?

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

What is the time complexity of finding the minimum element in an unsorted array of size n?

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

Which data structure is used to efficiently store and retrieve elements based on their priority?

  1. Queue
  2. Stack
  3. Heap
  4. Linked List
Question 4 Multiple Choice (Single Answer)

What is the maximum number of edges in a graph with n vertices and no self-loops?

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

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

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

What is the name of the theorem that states that any sufficiently large integer can be expressed as the sum of three primes?

  1. Goldbach's Conjecture
  2. Fermat's Last Theorem
  3. Euler's Theorem
  4. Chinese Remainder Theorem
Question 7 Multiple Choice (Single Answer)

Which complexity class represents problems that can be solved in polynomial time?

  1. P
  2. NP
  3. NP-complete
  4. NP-hard
Question 8 Multiple Choice (Single Answer)

What is the name of the problem that asks whether a given Boolean formula is satisfiable?

  1. Traveling Salesman Problem
  2. Knapsack Problem
  3. 3-SAT Problem
  4. Hamiltonian Cycle Problem
Question 9 Multiple Choice (Single Answer)

Which algorithm is used to find the maximum flow in a network?

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

What is the name of the theory that studies the relationship between computation and information?

  1. Computability Theory
  2. Information Theory
  3. Complexity Theory
  4. Automata Theory
Question 11 Multiple Choice (Single Answer)

Which algorithm is used to find the connected components of a graph?

  1. Depth-First Search
  2. Breadth-First Search
  3. Kruskal's Algorithm
  4. Prim's Algorithm
Question 12 Multiple Choice (Single Answer)

What is the name of the theorem that states that any sufficiently large integer can be expressed as the sum of four squares?

  1. Goldbach's Conjecture
  2. Fermat's Last Theorem
  3. Euler's Theorem
  4. Lagrange's Four-Square Theorem
Question 13 Multiple Choice (Single Answer)

Which complexity class represents problems that can be solved in exponential time?

  1. P
  2. NP
  3. NP-complete
  4. EXP
Question 14 Multiple Choice (Single Answer)

What is the name of the problem that asks whether a given graph contains a Hamiltonian cycle?

  1. Traveling Salesman Problem
  2. Knapsack Problem
  3. 3-SAT Problem
  4. Hamiltonian Cycle Problem
Question 15 Multiple Choice (Single Answer)

Which algorithm is used to find the minimum spanning tree of a weighted graph?

  1. Kruskal's Algorithm
  2. Prim's Algorithm
  3. Dijkstra's Algorithm
  4. Floyd-Warshall Algorithm