https://github.com/trviph/collection
Collection is a Go library that aims to implement basic data structures such as List, Queue, Stack, Heap, and more.
https://github.com/trviph/collection
data-structures go golang
Last synced: 4 months ago
JSON representation
Collection is a Go library that aims to implement basic data structures such as List, Queue, Stack, Heap, and more.
- Host: GitHub
- URL: https://github.com/trviph/collection
- Owner: trviph
- License: unlicense
- Created: 2025-01-02T11:48:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-23T14:23:08.000Z (6 months ago)
- Last Synced: 2025-09-23T15:36:17.331Z (6 months ago)
- Topics: data-structures, go, golang
- Language: Go
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Collection
[](https://pkg.go.dev/github.com/trviph/collection) [](https://codecov.io/gh/trviph/collection) [](https://github.com/trviph/collection/actions/workflows/ci.yaml)
Collection is a Go library that aims to implement basic data structures such as List, Queue, Stack, Heap, and more.
## Data Structures
- [Linked list](https://pkg.go.dev/github.com/trviph/collection#List) is implemented as a doubly linked list.
- [Stack](https://pkg.go.dev/github.com/trviph/collection#Stack) is implemented by using linked list as the base.
- [Queue](https://pkg.go.dev/github.com/trviph/collection#Queue) is implemented by using linked list as the base.
- [Heap](https://pkg.go.dev/github.com/trviph/collection#Queue) is implemented by using [slice](https://go.dev/blog/slices-intro) as the base.
## Caches
- [LRU](https://pkg.go.dev/github.com/trviph/collection/cache#LRU) implemeted cache with LRU eviction policy.
- [MRU](https://pkg.go.dev/github.com/trviph/collection/cache#MRU) implemeted cache with MRU eviction policy.