
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
github.com/theodesp/go-heaps
Reference implementations of heap data structures in Go
$ go get -u github.com/theodesp/go-heaps
Heaps
package main
import (
"github.com/theodesp/go-heaps"
pairingHeap "github.com/theodesp/go-heaps/pairing"
"fmt"
)
func main() {
heap := pairingHeap.New()
heap.Insert(go_heaps.Integer(4))
heap.Insert(go_heaps.Integer(3))
heap.Insert(go_heaps.Integer(2))
heap.Insert(go_heaps.Integer(5))
fmt.Println(heap.DeleteMin()) // 2
fmt.Println(heap.DeleteMin()) // 3
fmt.Println(heap.DeleteMin()) // 4
fmt.Println(heap.DeleteMin()) // 5
}
Operation | Pairing | Leftist | Skew | Fibonacci | Binomial | Treap |
---|---|---|---|---|---|---|
FindMin | Θ(1) | Θ(1) | Θ(1) | Θ(1) | Θ(log n) | O(n) |
DeleteMin | O(log n) | O(log n) | O(log n) | O(log n) | Θ(log n) | O(n) |
Insert | Θ(1) | O(log n) | O(log n) | Θ(1) | Θ(1) | O(n) |
Find | O(n) | |||||
Delete | O(n) | O(log n) | O(n) | Θ(log n) | O(n) | |
Adjust | O(n) | O(log n) | O(n) | Θ(log n) | O(n) | |
Meld | Θ(1) |
Operation | Rank Pairing |
---|---|
FindMin | Θ(1) |
DeleteMin | O(log n) |
Insert | Θ(1) |
Find | O(n) |
Delete | O(n) |
Adjust | O(n) |
Meld | Θ(1) |
Thanks goes to these wonderful people (emoji key):
Miroojin Bakshi 💻 | Syfaro 💻 | Theofanis Despoudis 💻 | Radliński Ignacy 💻 | Don McNamara 🚇 | Afrizal Fikri 💻 | Logan HAUSPIE 💻 |
Song Guo 💻 | Safwan Mohammed ⚠️ 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Copyright © 2017 Theo Despoudis MIT license
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.