sort함수의 comp 함수만 조절해 내림차순으로 sorting했다.

#include <string>
#include <algorithm>

using namespace std;

bool comp(char a, char b)
{
    return a > b;
}

string solution(string s) {

    sort(s.begin(), s.end(), comp);

    return s;
}

+ Recent posts