
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
github.com/akl773/strategic-heap-go
Advanced tools
Go-Strategic-Heap is a powerful and efficient Go library that implements heap data structures. It provides support for both min-heap and max-heap strategies, making it an ideal choice for projects that require priority queues or heap sorts. With its simple API and high-performance operations, Strategic-Heap-Go makes it easy to create and manipulate heaps.
To install Strategic-Heap-Go, use the go get command:
go get github.com/akl773/Strategic-Heap-Go/heap
Usage Here's a simple example that demonstrates how to use the library:
package main
import (
"fmt"
"github.com/akl773/Strategic-Heap-Go/heap"
)
func main() {
h := heap.NewMinHeap()
for i := 5; i > 0; i-- {
h.Push(i)
}
for h.Len() != 0 {
fmt.Println(h.Pop())
}
}
This program creates a min heap, pushes some integers onto it, and then pops them off. When executed, it will print the integers 1 through 5 in ascending order.
You can run the tests using the go test command:
go test
Pull requests are welcome. If you plan to make major changes, please open an issue first to discuss what you would like to change.
Please ensure that you update the tests as appropriate.
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.

Research
/Security News
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.