| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- Python
- 다이나믹프로그래밍
- boj
- 프로그래머스
- 파이썬
- SW역량테스트
- 알고리즘
- 스택
- 자료구조
- kakao
- DP
- 그래프
- 백준
- 카카오
- 자바스크립트
- SSAFY
- 힙큐
- 코테
- SWEA
- javascript
- 싸피
- 완전탐색
- 코딩테스트
- 삼성
- sort
- BFS
- Blind
- DFS
- algorithm
- Backjoon
- Today
- Total
목록Programming language (14)
맞왜틀
📗heapq란? 간단하게 리스트내에서 가장 작은 값이 맨처음위치(인덱스 0)애 오게 해주는 내장 모듈 우선순위 큐라고 알면 쉽다. 🔵 시작하기 import heapq 🔵 선언하기 보통 리스트를 선언하는 것처럼 만든다. heap_list = [] 🔵 원소 추가하기 ( heapq.heappush(리스트, 값 )) - 아래 보이는 것 처럼 가장 작은 값이 맨 처음 위치에 왔다. 시간복잡도 O(logn) heapq.heappush(heap_list, 5) heapq.heappush(heap_list, 10) heapq.heappush(heap_list, 99) heapq.heappush(heap_list, 2) print(heap_list) # [2, 5, 99, 10] 🔵 원소 삭제하기 ( heapq.heap..
🚗 ES6+ 에서 Obj를 간결하게 선언 const name = 'deok' const obj1 = { name: name, sayHello: function() { return `Hi my name is ${this.name}` } } const obj2 = { name, sayHello() { return `Hi my name is ${this.name}` } } obj1과 ob2는 완전히 같다. 🚓 객체의 비구조화(destructuring) const student = { name: 'deok', email: 'deok@deok.com', phone: '01012345678' } // 1번 // const name = student.name // const email = student.email /..
