본문 바로가기
C++

[프로그래머스] 배열 뒤집기

by 띰쥬 2025. 9. 2.
728x90
반응형
SMALL

#include <string>
#include <vector>

using namespace std;

vector<int> solution(vector<int> num_list) {
    vector<int> answer;
    
    for(auto n : num_list)
        answer.insert(answer.begin(), n);
    return answer;
}

728x90
반응형
LIST

'C++' 카테고리의 다른 글

[프로그래머스] 뒤집힌 문자열  (0) 2025.09.02
[프로그래머스] 짝수 홀수 개수  (0) 2025.09.02
[프로그래머스] 짝수의 합  (0) 2025.09.02
[프로그래머스] 양꼬치  (0) 2025.09.02
[프로그래머스] 배열의 평균값  (0) 2025.09.02

댓글