일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |
- Lv. 0
- Lv. 2
- Java
- javascript
- 너비 우선 탐색
- Stack
- 메모이제이션
- level 3
- 소프티어
- level3
- bfs
- dfs
- programmers
- group by
- C언어
- SQL 고득점 KIT
- 프로그래머스
- 다이나믹프로그래밍
- 깊이 우선 탐색
- 브루트포스
- 자바스크립트
- 스택
- 파이썬
- 문자열
- Lv. 1
- Lv. 3
- Dynamic Programming
- softeer
- Python
- DP
- Today
- Total
목록2024/03/25 (6)
몸과 마음이 건전한 SW 개발자
문제 링크 https://school.programmers.co.kr/learn/courses/30/lessons/42898 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 코드 function solution(m, n, puddles) { // DP 배열 초기화 let dp = Array(n + 1).fill(0).map(() => Array(m + 1).fill(0)); // 시작 지점 설정 dp[1][1] = 1; // 물웅덩이 설정 puddles.forEach(([c, r]) => { dp[r][c] = -1; }); // DP를 이용한 경로의..
문제 링크 https://school.programmers.co.kr/learn/courses/30/lessons/12938 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 코드 function solution(n, s) { let answer = []; if (s / n share); for (let idx = 0; idx < rema..
문제 링크 https://school.programmers.co.kr/learn/courses/30/lessons/12927 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 코드 function solution(n, works) { class heapq { constructor() { this.heap = []; }; size() { return this.heap.length; }; swap(left, right) { [this.heap[left], this.heap[right]] = [this.heap[right], this.heap[left]]; ..
문제 링크 https://school.programmers.co.kr/learn/courses/30/lessons/43105 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 코드 function solution(triangle) { const height = triangle.length; let dp = Array(height).fill().map((e, i) => Array(i+1).fill().map(() => 0)); dp[0][0] = triangle[0][0]; for (let idx = 1; idx < height; idx++) { cons..
구현 class heapq { constructor() { this.heap = []; }; size() { return this.heap.length; }; swap(left, right) { [this.heap[left], this.heap[right]] = [this.heap[right], this.heap[left]]; }; heappush(value) { this.heap.push(value); this.bubbleUp(); }; bubbleUp() { let son = this.heap.length - 1; let parent = Math.floor((son - 1) / 2); while (parent >= 0 && this.heap[son] < this.heap[parent]) { this...
문제 링크 https://school.programmers.co.kr/learn/courses/30/lessons/64063 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 코드 function solution(k, room_number) { const answer = []; let visited = new Map(); for (const rn of room_number) { if (!visited.has(rn)) { visited.set(rn, rn + 1); answer.push(rn); continue; }; let tmp = rn; const ..