File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # [ level 0] 뒤집힌 문자열 - 120822
2+
3+ [ 문제 링크] ( https://school.programmers.co.kr/learn/courses/30/lessons/120822 )
4+
5+ ### 성능 요약
6+
7+ 메모리: 33.6 MB, 시간: 0.03 ms
8+
9+ ### 구분
10+
11+ 코딩테스트 연습 > 코딩테스트 입문
12+
13+ ### 채점결과
14+
15+ 정확성: 100.0<br />합계: 100.0 / 100.0
16+
17+ ### 제출 일자
18+
19+ 2025년 05월 05일 21:19:24
20+
21+ ### 문제 설명
22+
23+ <p >문자열 <code >my_string</code >이 매개변수로 주어집니다. <code >my_string</code >을 거꾸로 뒤집은 문자열을 return하도록 solution 함수를 완성해주세요.</p >
24+
25+ <hr >
26+
27+ <h5 >제한사항</h5 >
28+
29+ <ul >
30+ <li >1 ≤ <code >my_string</code >의 길이 ≤ 1,000</li >
31+ </ul >
32+
33+ <hr >
34+
35+ <h5 >입출력 예</h5 >
36+ <table class =" table " >
37+ <thead><tr>
38+ <th >my_string</th >
39+ <th >return</th >
40+ </tr >
41+ </thead >
42+ <tbody><tr>
43+ <td >"jaron"</td >
44+ <td >"noraj"</td >
45+ </tr >
46+ <tr >
47+ <td >"bread"</td >
48+ <td >"daerb"</td >
49+ </tr >
50+ </tbody >
51+ </table>
52+ <hr >
53+
54+ <h5 >입출력 예 설명</h5 >
55+
56+ <p >입출력 예 #1</p >
57+
58+ <ul >
59+ <li ><code >my_string</code >이 "jaron"이므로 거꾸로 뒤집은 "noraj"를 return합니다.</li >
60+ </ul >
61+
62+ <p >입출력 예 #2</p >
63+
64+ <ul >
65+ <li ><code >my_string</code >이 "bread"이므로 거꾸로 뒤집은 "daerb"를 return합니다.</li >
66+ </ul >
67+
68+
69+ > 출처: 프로그래머스 코딩 테스트 연습, https://school.programmers.co.kr/learn/challenges
Original file line number Diff line number Diff line change 1+ function solution ( my_string ) {
2+ var answer = my_string . split ( '' ) . reverse ( ) . join ( '' ) ;
3+
4+ return answer ;
5+ }
You can’t perform that action at this time.
0 commit comments