The decrease by variable factor approach involves reducing the problem size by a variable factor in each step. Which algorithm uses this approach?

This question was previously asked in
Beltron Programmer 1 Oct 2023 Official Paper
View all BELTRON Programmer Papers >
  1. Merge sort
  2. Bubble sort
  3. Selection sort
  4. Insertion sort

Answer (Detailed Solution Below)

Option 1 : Merge sort
Free
Beltron Programmer Mock Test
0.8 K Users
20 Questions 20 Marks 24 Mins

Detailed Solution

Download Solution PDF

The correct answer is Option 1) Merge sort.

Key Points

  • Merge Sort uses the Decrease by Variable Factor approach by dividing the problem into smaller parts in each recursive step.
  • In merge sort, the array is recursively divided into subarrays — typically halves — and then merged after sorting.
  • Though typically split in halves, the actual size of subarrays in recursive calls may vary depending on implementation and size, hence the term variable factor.
  • It follows the Divide and Conquer strategy:
    1. Divide the array into two (or more) parts
    2. Recursively sort each part
    3. Merge the sorted parts
  • Time complexity: O(n log n) in all cases (best, average, and worst)

Additional Information

  • Option 2 – Bubble Sort: Uses a simple comparison approach, not based on decreasing the problem size by a factor.
  • Option 3 – Selection Sort: Selects the smallest (or largest) element and places it correctly; no recursive size reduction involved.
  • Option 4 – Insertion Sort: Builds the final sorted array one item at a time; again, no divide-and-conquer or variable factor reduction used.
  • Conclusion: Only Merge Sort among these follows the decrease by variable factor (via recursive subproblems) approach.
Latest BELTRON Programmer Updates

Last updated on Nov 25, 2024

-> BELTRON Programmer 2024 Notification has been released on the official website.

-> The Bihar State Electronics Development Corporation Limited (BELTRON) has announced a recruitment drive for Programmer positions on a contractual basis.

-> Specific vacancy details will be shared separately.

-> Interested candidates can apply online from November 11, 2024, to December 10, 2024.

-> The Minimum age of the candidates should be 21 years and maximum age should be 59 year of age. 

More Sorting Questions

Get Free Access Now
Hot Links: teen patti master king teen patti master apk teen patti gold download apk teen patti diya