Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johan-bolmsjo/gods
Go Data Structures
https://github.com/johan-bolmsjo/gods
data-structures go golang
Last synced: about 2 months ago
JSON representation
Go Data Structures
- Host: GitHub
- URL: https://github.com/johan-bolmsjo/gods
- Owner: johan-bolmsjo
- License: mit
- Created: 2018-11-27T23:22:29.000Z (about 6 years ago)
- Default Branch: v3
- Last Pushed: 2024-08-21T21:47:10.000Z (5 months ago)
- Last Synced: 2024-08-22T23:30:06.209Z (5 months ago)
- Topics: data-structures, go, golang
- Language: Go
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoDS
Go Data Structures, version 3.
Compared to version 2, the APIs has been revised to use the Go 1.23
iterators. The math MinInteger and MaxInteger functions has been
removed. Use the built-in min and max functions instead.Compared to version 1, the APIs has been revised to take advantage of
generic data types introduced in Go 1.18.## avltree
The AVL tree is converted from a C implementation originating from
https://web.archive.org/web/20070212102708/http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_avl.aspx
which is in the public domain.I have used the C version in many projects and trust it but this Go
conversion is not yet battle proven. I believe the conversion is robust
based on test results.### Design Choices
The AVL tree is not thread safe. Use external mutexes to achieve
concurrency safe operations.## list (circular double linked list)
An intrusive circular double linked list. The most useful property is
that a list node can remove itself from any list without having a
reference to one. This is useful to implement certain algorithms such as
timers or priority queues where the list a list node is stored in may be
unknown.## math
Mostly simple utility functions.