zyedidia/generic
zyedidia/generic has 1,353 GitHub stars and 85 forks. GitHot measured +1 in 7 days. Last checked 2026-11-09 05:42 UTC. Last push 2026-10-15.
A collection of generic data structures written in Go.
Crecimiento de estrellas medido
- in 24h
- Actualización retrasada
- in 7 days
- +1
- in 15 days
- Actualización retrasada
- in 1 month
- Actualización retrasada
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalGeneric Data Structures
This package implements some generic data structures.
array2d: a 2-dimensional array.avl: an AVL tree.bimap: a bi-directional map; a map that allows lookups on both keys and values.btree: a B-tree.cache: a wrapper aroundmap[K]Vthat uses a maximum size and evicts elements using LRU when full.hashmap: a hashmap with linear probing. The main feature is that the hashmap can be efficiently copied, using copy-on-write under the hood.hashset: a hashset that uses the hashmap as the underlying storage.heap: a binary heap.interval: an interval tree, implemented as an augmented AVL tree.list: a doubly-linked list.mapset: a set that uses Go's built-in map as the underlying storage.multimap: an associative container that permits multiple entries with the same key.queue: a First In First Out (FIFO) queue.rope: a generic rope, which is similar to an array but supports efficient insertion and deletion from anywhere in the array. Ropes are typically used for arrays of bytes, but this rope is generic.prope: a persistent version of the rope, which allows for keeping different versions of the rope with only a little extra time or memory.stack: a LIFO stack.trie: a ternary search trie.ulist: an un-rolled doubly-linked list.
See each subpackage for documentation and examples. The top-level generic
package provides some useful types and constraints. See DOC.md for
documentation.
Contributing
If you would like to contribute a new feature, please let me know first what you would like to add (via email or issue tracker). Here are some ideas:
- New data structures (bloom filters, graph structures, concurrent data structures, adaptive radix tree, or other kinds of search trees).
- Benchmarks, and optimization of the existing data structures based on those benchmarks. The hashmap is an especially good target.
- Design and implement a nice iterator API.
- Improving tests (perhaps we can use Go's new fuzzing capabilities).
Explorar proyectos relacionados
codecrafters-io/build-your-own-x
Domina la programación recreando desde cero tus tecnologías favoritas.
561,398 estrellaspublic-apis/public-apis
Una lista colectiva de API gratuitas
497,679 estrellasmorluto/rea
Ingeniería inversa de cualquier cosa con agentes, desde el comportamiento de la aplicación hasta los binarios nativos.
447,495 estrellasopenclaw/openclaw
La IA que de verdad hace las cosas. Cualquier sistema operativo y cualquier plataforma. Al estilo langosta. 🦞
394,261 estrellas