◈ 문제 설명
◈ 문제 설명 링크
코딩테스트 연습 - A로 B 만들기 | 프로그래머스 스쿨 (programmers.co.kr)
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
◈ 작성 코드
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int solution(string before, string after)
{
int answer = 0;
sort(before.begin(), before.end());
sort(after.begin(), after.end());
if(before == after)
{
answer = 1;
}
return answer;
}
'[프로그래머스 C++] > LEVEL 0' 카테고리의 다른 글
[프로그래머스 C++] 치킨 쿠폰 (0) | 2024.02.24 |
---|---|
[프로그래머스 C++] 이진수 더하기 (0) | 2024.02.18 |
[프로그래머스 C++] k의 개수 (0) | 2024.02.18 |
[프로그래머스 C++] 중복된 문자 제거 (0) | 2024.02.15 |
[프로그래머스 C++] 삼각형의 완성조건 (1) (0) | 2024.02.15 |