We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defcountingSort(arr):# create an array of zeros with the length (100)result=[0foriinrange(100)]# iterate the array and add one to the index everytime it see the same number as the indexforiinarr:result[i]=result[i]+1print(result)returnresult
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →