kaustubhgupta / Hacktoberfest

This is for the information that the repository has been excluded by the Hacktoberfest team from the event. This was done to maintain the quality standards and promote good quality open source contributions.
MIT License
55 stars 277 forks source link

Sorting using Counting Sort #678

Closed Madhav2008 closed 3 years ago

Madhav2008 commented 3 years ago

Counting Sort is a sorting technique based on keys between a specific range. It works by counting the number of objects having distinct key values (kind of hashing). Then doing some arithmetic to calculate the position of each object in the output sequence.

Counting sort is efficient if the range of input data is not significantly greater than the number of objects to be sorted.

Input:- [ 'm' , 'a' , 'd' ,'h' , 'a' , 'v' , 'a' , 'r' , 'o' , 'r' ,'a']

Output:- Sorted character array is aaaadhmorrv

Important Checklist

Languages and Assignees:

Notes

Anything you would like to discuss.

github-actions[bot] commented 3 years ago

Congrats for creating your first issue here! Wait till our mentors assign this issue to you. In the meantime have a look at contribution guidlines to avoid any PR rejection