알고리즘/프로그래머스

프로그래머스 - 문자열 내림차순으로 배치하기

안알랴줌. 2019. 9. 6. 00:19
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

string solution(string s) {
    string answer = "";
    sort(s.begin(), s.end(), greater<int>());
    answer = s;
    return answer;
}