[프로그래머스 | C# | Lv.0] 순서 바꾸기

728x90

https://school.programmers.co.kr/learn/courses/30/lessons/181891

📝 나의 풀이

using System;

public class Solution {
    public int[] solution(int[] num_list, int n) {
        int[] answer = new int[num_list.Length];
        
        int index =0;
        for(int i=n; i<num_list.Length; i++){
            answer[index] = num_list[i];
            index ++;
        }
        
        for(int i=0; i<n; i++){
            answer[index] = num_list[i];
            index++;
        }
        
        return answer;
    }
}
728x90