#include <string>
#include <vector>
#include <algorithm>
using namespace std;
 
bool cmp(char a, char b)
{
    if(a <= b)
    {
        return false;
    }
    else
    {
        return true;   
    }
}
 
string solution(string s) 
{
    // sort(s.begin(), s.end(), greater<char>());
    sort(s.begin(), s.end(), cmp);
    
    return s;
}
cs

+ Recent posts