Registry / utility / wangjia184-sortedset

wangjia184-sortedset

JSON →
library0.0.0-20220209072355-af6d6d227aa7gogounverified

Package sortedset provides a data structure that allows fast access to elements by key or by score, inspired by Redis Sorted Sets.

go get github.com/wangjia184/sortedset
INSTALL
IMPORT
SIG · WANGJIA184-SORTEDS
W
wangjia184-sortedset
utilitygov0.0.0-20220209072355-af6d6d227aa7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sortedset
github.com/wangjia184/sortedset

Creates a sorted set, adds players with scores, and finds a player's rank.

package main import ( "fmt" "github.com/wangjia184/sortedset" ) func main() { set := sortedset.New() set.AddOrUpdate("player1", 100) set.AddOrUpdate("player2", 200) rank, _ := set.FindRank("player1") fmt.Println(rank) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20220209072355-af6d6d227aa7latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
wangjia184-sortedset — go get wangjia184-sortedset · libregistry