코딩테스트/[C#] 프로그래머스
[프로그래머스 | C# | Lv.0] 순서 바꾸기
냠냠쿠
2023. 9. 5. 20:16
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