Which of the following sorting algorithms is stable, non-comparison based and…

2025

Which of the following sorting algorithms is stable, non-comparison based and works best when input is uniformly distributed?

  1. A.

    Selection sort

  2. B.

    Bucket sort

  3. C.

    Shell sort

  4. D.

    Quick sort

Attempted by 59 students.

Show answer & explanation

Correct answer: B

Bucket sort is the correct choice because it is a non-comparison based sorting algorithm that achieves linear time complexity O(n+k) when input data is uniformly distributed. Unlike comparison-based algorithms such as Quick sort or Merge sort, Bucket sort distributes elements into buckets and sorts them individually without comparing every pair of values.

Explore the full course: Mppsc Assistant Professor