ghostmkg / programming-language

You write code in any programming language you want. And push the code.
33 stars 79 forks source link

Added Radix Sort Algorithm #74

Closed SupratitDatta closed 1 day ago

SupratitDatta commented 2 days ago

What does this PR do? This PR implements Radix Sort for sorting an array of non-negative integers. Radix Sort is a non-comparative sorting algorithm that sorts numbers digit by digit starting from the least significant digit (LSD) to the most significant digit (MSD), using counting sort as a subroutine.

Examples: Input: Array: [170, 45, 75, 90, 802, 24, 2, 66]

Output: [2, 24, 45, 66, 75, 90, 170, 802]

Explanation: The Radix Sort algorithm sorts the array by first sorting according to the least significant digit and progresses to the most significant digit. The final sorted array is [2, 24, 45, 66, 75, 90, 170, 802].

Have you read the Contributing Guidelines on issues? Yes