https://school.programmers.co.kr/learn/courses/30/lessons/12909?language=cpp
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
#include<string>
#include <iostream>
using namespace std;
bool solution(string s)
{
int res[2] = {};
for (const auto& el : s)
{
++res[(el == '(') ? 0 : 1];
if (res[0] < res[1]) return false;
}
return res[0] == res[1];
}
GitHub - developeSHG/Algorithm-Baekjoon_Programmers: 백준 and 프로그래머스 소스코드
백준 and 프로그래머스 소스코드. Contribute to developeSHG/Algorithm-Baekjoon_Programmers development by creating an account on GitHub.
github.com
'Coding Test > Programmers' 카테고리의 다른 글
[Programmers] Lv 2. 숫자의 표현 (0) | 2023.05.18 |
---|---|
[Programmers] (월간 코드 챌린지 시즌1) Lv 2. 이진 변환 반복하기 (0) | 2023.05.16 |
[Programmers] Lv 2. 최솟값 만들기 (0) | 2023.05.12 |
[Programmers] Lv 2. JadenCase 문자열 만들기 (0) | 2023.05.11 |
[Programmers] Lv 2. 최댓값과 최솟값 (0) | 2023.05.10 |
댓글