문제

풀이

public String solution(String s) {
    int max = Integer.MIN_VALUE;
    int min = Integer.MAX_VALUE;

    for (String str : s.split(" ")) {
        max = Math.max(Integer.parseInt(str), max);
        min = Math.min(Integer.parseInt(str), min);
    }

    return min + " " + max;
}