프로그래머스 - 뒤에서 5등까지

MinJun·2023년 4월 28일
0

문제링크 - 프로그래머스 - 뒤에서 5등까지

import java.util.*;
class Solution {
    public int[] solution(int[] num_list) {
        int[] answer = new int[5];
        Arrays.sort(num_list);
        for(int i=0; i<5;i++){
            answer[i] = num_list[i];
        }
        return answer;
    }
}
profile
첫 걸음

0개의 댓글