Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 데이터베이스
- android
- 개발자
- 형태소 분석기
- Python
- 코딩
- 프로그래머스
- java
- 유튜브
- 파이썬
- 메모장
- javascript
- 함수형 인터페이스
- 프로그래밍
- 이진 변환 반복하기
- 셀레니움
- jdbc
- js
- 모바일
- jsp
- 세션
- 자바스크립트
- Programmers
- 개발
- MySQL
- 파일 저장
- 입출력
- 크롤링
- n^2 배열 자르기
- 자바
Archives
- Today
- Total
목록카카오 (1)
개인용 복습공간

board를 변환 후 shift()로 뽑아서 동일한 인형이면 pop() 시키기 function solution(board, moves) { board = board.map((item, idx) => item.reduce((acc, el, lvl) => { if (board[lvl][idx] != 0) { acc.push(board[lvl][idx]); } return acc; }, [])); let temp = []; return moves.reduce((rs, el) => { const picker = board[el - 1].shift(); if(picker){ if (temp[temp.length - 1] == picker) { temp.pop(); rs += 2; }else{ temp.push(p..
programmers
2023. 10. 25. 12:56