DSA_Worksheet
DSA_Worksheet copied to clipboard
Count Sort
❗Write Code in Only One Language (CPP, C, Java, Python)
Give File Name : <CountSort> ✅ In respective language folder
📑 DESCRIPTION
Problem Title
Problem Statement: Given an arr consisting of positive digits, sort the array in ascending order using Counting Sort.
Note: Use only Counting Sort Algorithm
Input Format:
First line will contain a single integer - the size of list
Second line will contain space separated integers of given length
Input format here
5
4 3 9 2 2 1
Output Format:
Array Before Sorting :-
Space separated list of integers (Unsorted)
Array After Sorting :-
Space separated list of integers (Sorted)
Output format here
1 2 2 3 4 9
Example
Example
Sample Input 1
9
44 65 12 12 77 22 22 1 1
Sample Output 1
Array Before Sorting :-
44 65 12 12 77 22 22 1 1
Array After Sorting :-
1 1 12 12 22 22 44 65 77
Sample Input 2
3
9 9 1
Sample Output 2
Array Before Sorting :-
9 9 1
Array After Sorting :-
1 9 9
Constraints
0 <= n <= 1000
TC - O(n+k)
hey, can you please assign me this issue
@lilmistake Please assign this to me for Java Based Solution...~~
hello, can you please assign me this issue for python based solution
@lilmistake can you assign me for C based solution?
Please assign this to me for python based solution
@lilmistake can you please review my PR #63
Hey @lilmistake please review my PR #94
@lilmistake @Chitresh-code please review my PR #94
@lilmistake @Chitresh-code hacktoberfest is about to end please review my PR #94 and if there is no problem please merge it