Question:

Which of the following algorithms is based on the divide and conquer technique?

Show Hint

To understand divide and conquer:
- Look for recursive division (e.g., Quick Sort, Merge Sort).
- Contrast with iterative methods (e.g., Bubble Sort).
- Practice tracing Quick Sort steps.
  • Selection Sort
  • Quick Sort
  • Insertion Sort
  • Bubble Sort
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

To determine which algorithm uses the divide and conquer technique, we need to understand the approach and evaluate each option.
Step 1: Understand Divide and Conquer
The divide and conquer technique involves dividing a problem into smaller subproblems, solving them independently, and combining the results.
Step 2: Analyze Option A - Selection Sort
Selection Sort repeatedly finds the minimum element and places it at the beginning, using a linear search.
It does not divide the problem into subproblems.
Thus, option A is incorrect.
Step 3: Analyze Option B - Quick Sort
Quick Sort selects a pivot, partitions the array around it, and recursively sorts the subarrays.
This clearly follows the divide and conquer strategy.
Thus, option B is correct.
Step 4: Analyze Option C - Insertion Sort
Insertion Sort builds the sorted array one element at a time by inserting each element into its correct position.
It does not use division into subproblems.
Thus, option C is incorrect.
Step 5: Analyze Option D - Bubble Sort
Bubble Sort compares adjacent elements and swaps them, repeating until sorted.
It does not involve dividing the problem.
Thus, option D is incorrect.
Step 6: Conclusion
Quick Sort is based on the divide and conquer technique, making option B the answer.
Was this answer helpful?
0
0