내풀이
import java.util.*;
class Solution {
public String[] solution(String my_string) {
String[] answer = new String[my_string.length()];
for(int i=0; i<my_string.length(); i++){
answer[i] = my_string.substring(i,my_string.length());
}
Arrays.sort(answer);
return answer;
}
}
오름차순 정렬
Arrays.sort(answer);
내림차순 정렬
Arrays.sort(answer, Comparator.reverseOrder());