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
- Java
- Lv. 3
- SQL 고득점 KIT
- Baekjoon
- group by
- 깊이 우선 탐색
- 티스토리챌린지
- javascript
- Lv. 1
- Lv. 0
- 너비 우선 탐색
- Dynamic Programming
- select
- SQL
- 자바스크립트
- 파이썬
- Lv. 2
- programmers
- join
- DP
- LEVEL 2
- 오블완
- 소프티어
- Python
- bfs
- 백준
- level 3
- 프로그래머스
- dfs
- softeer
Archives
- Today
- Total
목록우선순위큐 (1)
몸과 마음이 건전한 SW 개발자
자바스크립트 Heap [최소힙 구현]
구현 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...
개발 언어 입문/자바스크립트 문법
2024. 3. 25. 02:49