일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Lv. 0
- Dynamic Programming
- Lv. 1
- Baekjoon
- 깊이 우선 탐색
- 프로그래머스
- 소프티어
- dfs
- level 3
- 자바스크립트
- programmers
- DP
- select
- Python
- 백준
- group by
- LEVEL 2
- join
- bfs
- 오블완
- SQL
- Lv. 2
- Java
- javascript
- softeer
- SQL 고득점 KIT
- 너비 우선 탐색
- Lv. 3
- 티스토리챌린지
- 파이썬
- Today
- Total
목록알고리즘/꼭 다시 보기 (6)
몸과 마음이 건전한 SW 개발자

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/81303 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드def solution(n, k, cmd): sb = [] deletes = [] result = [1] * (n) up = [0] * (n) down = [0] * (n) for i in range(n): up[i] = i - 1 down[i] = i + 1 up[0] = -1 down[n-1] = -1 for c in cmd: if ..

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/12923 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(begin, end) { const n = end - begin + 1; const answer = Array(n).fill(1); for (let i = 0; i 풀이 방법begin 부터 end까지 각각의 수의 최대 약수를 찾는다.여기서 최대 약수는 1보다 크고 10_000_000보다 작은 수이다.찾은 최대 약수를 저장하면 끝!느낀점전에는 어떻게 풀지 바로 안떠올랐는데 이번에는 ..

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/42860 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(name) { const aCode = "A".charCodeAt(); const zCode = "Z".charCodeAt() + 1; const lenN = name.length; let answer = 0 const moveCost = (char) => { const charCode = char.charCodeAt(); return M..

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/12936 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(n, k) { // 팩토리얼 값을 미리 계산 const factorial = Array(n+1).fill(1); for (let i = 2; i i+1); // 결과를 저장할 리스..

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/152996 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(weights) { const map = new Map(); for (const w of weights) { if (map.has(w)) { map.set(w, map.get(w)+1); } else { map.set(w, 1); } } const answer = Array.from(map.keys..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/154539?language=javascript 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(numbers) { const n = numbers.length; const answer = Array.from({length: n}, () => -1); const stack = []; for (let i = 0; i = numbers[i]) { break; } else { ..