Skip to content

🧱 Sture is a collection of data structures based on Go 1.18+ Generics (Stack, Queue, Linked List, etc.)

License

Notifications You must be signed in to change notification settings

HotPotatoC/sture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sture

A collection of data structures based on Go 1.18+ Generics.

Why this name?

I basically used an AI to generate the name sture 🗿. But... sture can be interpreted as "structure".

Installation

go get github.com/HotPotatoC/sture

Usage

Creating a priority queue using:

import "github.com/HotPotatoC/sture/queue"

func main() {
    pq := queue.NewPriorityQueue[string]()

    pq.Enqueue("Adam", 1)
    pq.Enqueue("John", 3)
    pq.Enqueue("Bob", 2)

    top := pq.Peek()
    fmt.Println(top) // John
}

See more examples here

Spec

Supported data structures at the moment:

Support

If this project is helpful to you, please consider supporting me by donating or just give this project a 🌟

Buy Me A Coffee

About

🧱 Sture is a collection of data structures based on Go 1.18+ Generics (Stack, Queue, Linked List, etc.)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages