Counting sort algorithm

what is counting sort algorithm?

hey @RULEREMPIRES
countingSort(array, size)
max <- find largest element in array
initialize count array with all zeros
for j <- 0 to size
find the total count of each unique element and
store the count at jth index in count array
for i <- 1 to max
find the cumulative sum and store it in count array itself
for j <- size down to 1
restore the elements to array
decrease count of each element restored by 1

https://ide.codingblocks.com/s/268037 is this correct counting sort algo ?

Hey @RULEREMPIRES
few Mistakes
correct Code