https://school.programmers.co.kr/learn/courses/30/lessons/120821
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
function solution(num_list) {
var answer = [];
answer = num_list.reverse();
return answer;
}
+)230509
const solution = (num_list) => {
return num_list.reverse();
}
230525 파이썬으로 다시 풀이
def solution(num_list):
return num_list[::-1]
230915 C++
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> solution(vector<int> num_list) {
std::reverse(num_list.begin(), num_list.end());
return num_list;
}
'코딩테스트 > LV. 0' 카테고리의 다른 글
LV. 1 :: 피자 나눠 먹기 1 (0) | 2023.01.20 |
---|---|
LV. 0 :: 피자 나눠 먹기 3 (0) | 2023.01.20 |
LV. 0 :: 배열 원소의 길이 (0) | 2023.01.20 |
LV. 0 :: 아이스 아메리카노 (0) | 2023.01.20 |
LV. 0 :: 짝수의 합 (0) | 2023.01.20 |
댓글