
문제 https://school.programmers.co.kr/learn/courses/30/lessons/181859 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 풀이 특정 결과가 나올때까지 반복 => while문 사용하기 나머지 코드는 조건에 맞게 작성해준다. 최종적으로 빈배열이 되면 [-1]을 리턴해주는 코드를 추가한다. function solution(arr) { let i = 0; let stk = []; while (i < arr.length) { if (stk.length === 0 || stk[stk.length - 1] !== arr[..