"프로그래머스 181905 문자열 뒤집기"의 두 판 사이의 차이

 
1번째 줄: 1번째 줄:
==개요==
==개요==
{{프로그래머스|레벨=0|페이지=3}}
{{프로그래머스|레벨=0|페이지=3|분류=코딩 기초 트레이닝}}


==C++==
==C++==

2023년 11월 14일 (화) 22:44 기준 최신판

1 개요[ | ]

프로그래머스 181905 문자열 뒤집기

2 C++[ | ]

#include <string>
#include <vector>
#include <algorithm>

using namespace std;

string solution(string my_string, int s, int e) {
    string answer = my_string;
    reverse(answer.begin()+s, answer.begin()+e+1);
    return answer;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}