
Photo by Markus Spiske on Unsplash 이번에는 container/heap 패키지를 이용해서 구현해보자 "요구사항만 만족해주면 원하는 heap 기능을 제공하겠다." 이렇게 한 줄 요약할 수 있겠다. (Fix, Remove 등의 기능도 있지만 이것은 생략하겠다.) 이전 포스팅한 from the scratch 구현 - https://jusths.tistory.com/215 - https://play.golang.org/p/cjYXpQjPiZY container/heap을 이용한 구현 - https://play.golang.org/p/JwU6aHNGb7k 요구사항과 제공기능 https://golang.org/pkg/container/heap/#Interface 어떠한 타입이건 sort...

Photo by Markus Spiske on Unsplash LeetCode 문제를 풀다가 min heap이 필요한 문제를 만난김에, Go는 쉽게 쓸 수 있는 패키지는 제공하지 않기에 (오히려 그 덕분에) min heap을 들여다보고 공부해보게 되었다. (참고: LeetCode problem: https://leetcode.com/contest/weekly-contest-237/problems/single-threaded-cpu/ ) Min Heap이란 무엇인가? 이진 트리인데 parent는 아래의 child 노드들보다 작은 값을 가진다. 실제 구현은 슬라이스의 형태이다. < 이미지 출처: https://www.wikiwand.com/en/Min-max_heap > 아래 이미지는 Max Heap이지만,..
- Total
- 327,561
- Today
- 27
- Yesterday
- 136
- 클린 애자일
- Pocket Edition
- go
- Team of Rivals: The Political Genius of Abraham Lincoln
- 명상
- golang
- Nike Run Club
- 하드씽
- 자아
- agile
- min heap
- AES
- 독서후기
- websocket
- gorilla/websocket
- post quantum
- additional data
- solid
- sidh
- post-quantum cryptographic algorithm
- SIKE
- powershell
- gcm
- Gin
- framework
- Garmin Connect
- Handshake
- heap
- 권력의 조건