PriorityQueue
PriorityQueue
A Heap implementation in crystal.
Installation
Add it to Projectfile
deps do
github "hangyas/PriorityQueue"
end
Usage
require "PriorityQueue"
q = PriorityQueue{5, 2, 9}
q.pop #9
q.pop #5
q.pop #2
#custom order
q = PriorityQueue(Int32).new {|a, b| a < b}
q << 5 << 2 << 9
q.pop #2
q.pop #5
q.pop #9
Repository
PriorityQueue
Owner
Statistic
- 1
- 0
- 0
- 0
- 0
- over 9 years ago
- September 14, 2015
License
MIT License
Links
Synced at
Tue, 21 Jan 2025 09:56:57 GMT
Languages