For this Question: An array of 5 string is given where each string contains 2 characters, Now you have to sort these strings, like in a dictionary.Input contains 5 strings of length 2 separated by spaces.
String contains only uppercase English letters.Print the sorted array.INPUT : 
AS KF ER DD JK

OUTPUT : 
AS DD ER JK KF, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;



int main()
{
map<string,int> m;
string s;
for(int i=0;i<5;i++){
    cin>>s;
    m[s]++;
}
for(auto it=m.begin();it!=m.end();it++){
        while(it->second>0){
    cout<<it->first<<" ";
    it->second--;}
}
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?