Skip to content

RezaRazmara/counting_sort_algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Countingsort algorithm

counting algorithm with the linear time complexity of O(n).

Description

we have a class of sorting algorithms that are based of comparision. In these algorithm the time complexity never becomes less than O(nlogn). so we should search on algorithms that take some restrictions. so a limit could be that the numbers are all integers and they are in a limited closed bounderies which means between 0 to 10 or between 10 to 99.

How it works

the foundation of algorithm is that first it counts each number in the list. After that it create an index array with length of maximum number in the list. Then each index of the the index array is correspond to the number in the list. We fill each index with the counts of each number in the list. So It is the foundation, It isn't aimed for further details.

About

counting algorithm with the linear time complexity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages