Counting Sort 1

  • + 1 comment

    MY C++ CODE :)

    #include <bits/stdc++.h>
    #define ll long long
    using namespace std;
    int main() 
    {
        /* Enter your code here. Read input from STDIN. Prll output to STDOUT */   
        map <ll,ll> mp;
        ll n,x;
        cin>>n;
        for(ll i=0;i<n;i++)
        {
            cin>>x;
            mp[x]+=1;
        }
        for(ll i=0;i<100;i++)
        {
            cout<<mp[i]<<" ";
        }
        return 0;
    }