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

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/389480# 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(info, n, m) { let answer = 0; const lenI = info.length; info.sort(([a, b], [c, d]) => c/d - a/b); let [cntA, cntB] = [0, 0]; for (let i = 0; i = n) { answer = -1; } else { answer = cntA; ..

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/388353 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(storage, requests) { let cnt = 0; const n = storage.length; const m = storage.at(0).length; const di = [-1, 1, 0, 0]; const dj = [0, 0, -1, 1]; const isValid = (ni, nj) => { return 0 Array(m+2..

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/388352 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(n, q, ans) { const lenQ = q.length; let answer = 0; for (let i = 1; i 풀이 방법dfs로 만들다가 실패해서 5중 for문으로 만들었다.조합을 만들어서 q의 요소들과 비교한다.ans와 같은 값이 나오면 answer++이후 answer를 출력하면 끝!느낀점사실 dfs를 사용해야 더 깔끔한 풀이가 될 수 있지만 결국 가장 직관적이고..

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/389479?language=javascript 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(players, m, k) { const lenP = players.length; let answer = 0; const servers = Array.from({length: lenP}, () => 0); players.forEach((e, idx) => { if (e >= m) { const sai = s..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/59411 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드SELECT ANMO.ANIMAL_ID, ANMO.NAMEFROM ANIMAL_INS ANMIRIGHT JOIN ANIMAL_OUTS ANMOON ANMI.ANIMAL_ID = ANMO.ANIMAL_ID AND ANMI.DATETIME IS NOT NULLORDER BY DATEDIFF(ANMO.DATETIME, ANMI.DATETIME) DESCLIMIT 2;풀이 과정조인 조건:ANIMAL_INS 테이블과 A..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/164670 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드WITH THREE_MORE AS ( SELECT WRITER_ID FROM USED_GOODS_BOARD GROUP BY WRITER_ID HAVING COUNT(*) >= 3),TM_USERS AS ( SELECT UGU.USER_ID, UGU.NICKNAME, CONCAT(UGU.CITY, ' ', UGU.STREET_ADDRESS1, ' ', UGU.STR..