utkarsh-shekhar / basic-programs

7 stars 53 forks source link

Counting sort #105

Open utkarsh-shekhar opened 4 years ago

utkarsh-shekhar commented 4 years ago

Counting sort: https://en.wikipedia.org/wiki/Counting_sort

Given an array of N numbers where each number falls in the range [1-100,000], return the sorted array. Time complexity should be O(n).

Example:

vector<int> sort(vector<int> numbers) {
  // should return sorted array.
}

You can use any language you are comfortable with.

iamraghs commented 4 years ago

assign this problem to me ....

rajat1401 commented 4 years ago

Hi @utkarsh-shekhar I can write a python solution for this. please assign it to me. i have made a pr for the same. please review.

shubhamnarkhede commented 4 years ago

can i get this issue?

utkarsh-shekhar commented 4 years ago

Anyone can pick up the issues for different languages.

rajat1401 commented 4 years ago

Great. Can you review and merge my PR then. Thanks!

darshmgandhi commented 4 years ago

Have implemented Counting Sort in java. Please review my PR #111 . It would be great help. Thank you so much.

jyotiGambhir commented 4 years ago

Can you assign it to me? I would like to code in CPP.

Pratyushraj2121 commented 4 years ago

I have done the task using C language. Can you please check and PR.

Thank You!