Explanation

- **Pigeonhole Sort** is a comparison-based sorting algorithm that works well when the range of the elements is small. It maps each element to a "hole" (index) and places it in the corresponding location.
  • Steps:

    • Find the minimum and maximum values in the input.
    • Create an array of pigeonholes (or slots).
    • Place each element in its corresponding pigeonhole.
    • Collect the elements from the pigeonholes and form the sorted array.
  • Time Complexity:

    • Best Case, Average Case, Worst Case: O(n + range).