diff --git a/HSKIM/51to60/54.py b/HSKIM/51to60/54.py new file mode 100644 index 0000000..d62bb57 --- /dev/null +++ b/HSKIM/51to60/54.py @@ -0,0 +1,15 @@ +def solution(s): + answer = '' + arr = [0 for _ in range(26)] + + for c in s: + arr[ord(c) - ord('a')] += 1 + + for i in range(26): + while arr[i] > 0: + answer += chr(i + ord('a')) + arr[i] -= 1 + + return answer + +print(solution("algorithm")) \ No newline at end of file