일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- dp
- 쉬운 문제
- Algorithm
- 문자열
- javascript
- 가천대
- 자바스크립트
- 백준
- 타입 챌린지
- type challenge
- BFS
- 프로그래머스
- TCP
- typescript
- socket
- 프로그래머스 레벨 2
- Crawling
- 레벨 1
- ip
- 크롤링
- 타입스크립트
- 수학
- 소켓
- Node.js
- 그래프
- Nestjs
- HTTP 완벽 가이드
- HTTP
- 알고리즘
- dfs
- Today
- Total
목록레벨2 (2)
kakasoo

const solution = (dirs) => { const answer = []; let next = { y : 5, x : 5 }; dirs.split('').forEach((dir) => { const cur = next; const funcs = { "U" : function (cur) { return { y : cur.y + 1, x : cur.x }; }, "D" : function (cur) { return { y : cur.y - 1, x : cur.x }; }, "R" : function (cur) { return { y : cur.y, x : cur.x + 1 }; }, "L" : function (cur) { return { y : cur.y, x : cur.x - 1..

const left = 0; const right = 1; const isRight = (arr) => { const stack = []; for (const item of arr) { stack.push(item); if (stack.length >= 2) { while ((stack[stack.length - 2] === '(' && stack[stack.length - 1] == ')') || (stack[stack.length - 2] === '[' && stack[stack.length - 1] == ']') || (stack[stack.length - 2] === '{' && stack[stack.length - 1] ==..