Skip to content

Commit

Permalink
이슈 #349에서 솔루션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 19, 2024
1 parent e15ad88 commit 8a7f594
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Programmers/문자열_정렬하기_2.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>

using namespace std;

string solution(string my_string) {
string answer = "";
for (int i = 0; i < my_string.length(); i++) {
if (isupper(my_string[i])) {
my_string[i] -= 'A' - 'a';
}
}

sort(my_string.begin(), my_string.end());

return my_string;
}

0 comments on commit 8a7f594

Please sign in to comment.