https://school.programmers.co.kr/learn/courses/30/lessons/12973?language=javascript
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
function solution(s) {
const stack = [];
for(let i = 0 ; i < s.length ; i++ )
(!stack.length || stack[stack.length - 1] !== s[i]) ? stack.push(s[i]) : stack.pop();
return stack.length ? 0 : 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 Test] (2회차 코딩테스트) No 3. MostAppearNumber (0) | 2023.01.27 |
---|---|
[Programmers Test] (2회차 코딩테스트) No 1. binaryNumber (0) | 2023.01.27 |
[Programmers] Lv 2. 다음 큰 숫자 (0) | 2023.01.25 |
[Programmers] (Dynamic Programming) Lv 2. 피보나치 수 (0) | 2023.01.25 |
[Programmers] Lv 2. 숫자의 표현 (0) | 2023.01.25 |
댓글