짝지어 제거하기 https://programmers.co.kr/learn/courses/30/lessons/12973
function solution(s) {
s = s.split("");
const stack = [];
s.forEach((v, index) => {
stack.push(v);
if (stack.length >= 2) {
if (stack[stack.length - 2] === stack[stack.length - 1]) {
stack.pop();
stack.pop();
}
}
});
return stack.length === 0 ? 1 : 0;
}