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

Jmnote (토론 | 기여)님의 2023년 9월 16일 (토) 12:45 판

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 }}