Algorithms and Complexity MCQs (Part-8)

What is the goal of approximation algorithms?

A Solve in polynomial time
B Find the exact solution
C Maximize time complexity
D Find near-optimal solutions

Which of the following is an example of a randomized algorithm?

A Quick Sort
B Dijkstra’s Algorithm
C Binary Search
D Merge Sort

What is the main advantage of using randomized algorithms?

A Guaranteed optimal solution
B Solves all problems
C Faster average performance
D Consistent worst-case performance

Which of these problems is often solved using approximation algorithms?

A Quick Sort
B Traveling Salesman Problem
C Linear Search
D Binary Search

What is the space complexity of randomized algorithms?

A Always O(n)
B Depends on the problem
C Always O(1)
D Always O(n²)

What is a common application of computational geometry algorithms?

A Finding shortest paths
B Searching in arrays
C Collision detection
D Sorting integers

What is the expected time complexity of Quick Sort on average?

A O(n log n)
B O(n)
C O(n²)
D O(log n)

Which algorithm provides an approximation for the knapsack problem?

A Merge Sort
B Floyd-Warshall
C Greedy algorithm
D Dijkstra’s Algorithm

What is the main idea behind the Randomized Quick Sort?

A Sort in reverse order
B Choose pivot randomly
C Use dynamic programming
D Sort using a fixed pivot

What is the worst-case time complexity of Quick Sort?

A O(n log n)
B O(log n)
C O(n)
D O(n²)

In computational geometry, what is the convex hull problem?

A Finding the largest area
B Sorting points in space
C Finding the smallest enclosing polygon
D Finding shortest paths

Which of these problems is NP-Hard?

A Traveling Salesman Problem
B Shortest Path Problem
C Binary Search
D Linear Search

What is the benefit of using approximation algorithms for NP-Hard problems?

A Solve in polynomial time
B Guaranteed optimal solution
C Fast and practical solutions
D Always gives exact solution

Which algorithm is often used in computational geometry to detect intersections?

A Binary Search
B Quick Sort
C Convex Hull
D Sweep Line Algorithm

What is the goal of a randomized algorithm?

A Find approximate solutions quickly
B Solve NP-Hard problems exactly
C Always provide exact solutions
D Work deterministically