class MinHeap { constructor() { this.heap = []; } empty() { if (this.heap.length == 0) { return true; } return false; } swap(arr, x, y) { let temp = arr[x]; arr[x] = arr[y]; arr[y] = temp; return; } insert(value) { this.heap.push(value); this.bubbleUp(); } bubbleUp() { let currentIndex = this.heap.length - 1; while (currentIndex > 0) { const parentIndex = Math.floor((currentIndex - 1) / 2); if (..
class MaxHeap { constructor() { this.heap = []; } swap(arr, x, y) { let temp = arr[x]; arr[x] = arr[y]; arr[y] = temp; return; } empty() { if (this.heap.length == 0) { return true; } return false; } insert(value) { this.heap.push(value); this.bubbleUp(); } bubbleUp() { let currentIndex = this.heap.length - 1; while (currentIndex > 0) { const parentIndex = Math.floor((currentIndex - 1) / 2); if (..
class Node{ constructor(item){ this.item = item; this.prev = null; this.next = null; } } class Deque{ constructor(){ this.head = null; this.tail = null; this.length = 0; } push_front(item){ const node = new Node(item); if(this.size()==0){ this.head = node; this.tail = node; }else{ this.head.prev = node; node.next=this.head; this.head = node; } this.length+=1; } push_back(item){ const node = new ..
class Node{ constructor(item){ this.item = item; this.next = null; } } class Queue{ constructor(){ this.head = null; this.tail = null; this.length = 0; } push(item){ const node = new Node(item) if(this.head==null){ this.head= node; }else{ this.tail.next = node; } this.tail = node; this.length +=1; } pop(){ const popItem = this.head; this.head = this.head.next; this.length -=1; return popItem.ite..
class Node{ constructor(item){ this.item = item; this.next = null; } } class Stack{ constructor(){ this.topOfStack = null; this.length = 0; } push(item){ const node = new Node(item); if(this.topOfStack!=null){ node.next = this.topOfStack; } this.topOfStack = node; this.length+=1; } pop(){ if(this.length==0)return -1; const popItem = this.topOfStack; this.topOfStack = popItem.next; this.length-=1..
- Total
- Today
- Yesterday
- 다이나믹프로그래밍
- 다이나밍프로그래밍
- 최소공통조상
- 면접질문
- BFS
- 은둔청년체험
- 개발자면접
- 서버개발
- 면접비
- 그래프
- create databases;
- 로드나인
- 동적프로그래밍
- 롱베케이션
- MySQL
- 투포인터 연습
- 투포인터
- create db
- 서버점검
- DB 생성
- MOD
- node.js
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |