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

// 프로그래머스 레벨2 영어 끝말잇기를 풀었습니다. function solution(n, words) { let 중복체크 = []; for (let i = 0; i < words.length; i++) { if (i === 0) 중복체크.push(words[i]); else if ( !중복체크.includes(words[i]) && words[i - 1][words[i - 1].length - 1] === words[i][0] ) { 중복체크.push(words[i]); } else { return [(i % n) + 1, parseInt(i / n) + 1]; } } return [0, 0]; }
프로그래밍/알고리즘 풀이
2021. 6. 29. 13:14