learn-ds-go is a personal project focused on implementing various data structures using the Go programming language. This repository serves as a platform for my own learning and exploration, and is not intended for use as a library in other projects.
- Separate Chaining: Resolves collisions by maintaining a linked list of all elements that hash to the same slot.
- Open Addressing: Handles collisions by finding another slot within the table.
- Robin Hood Hashing: A variant of open addressing that aims to minimize the variance of probe sequences.
- Array-based Implementation: A fixed-size stack that follows the Last-In-First-Out (LIFO) principle.
- Features:
- Push/Pop operations with overflow and underflow checks
- IsEmpty/IsFull state checks
- Generic type support using Go's
any
type
- Ring Buffer Implementation: A fixed-size, circular buffer-based queue that follows the First-In-First-Out (FIFO) principle.
- Features:
- Enqueue/Dequeue operations with overflow and underflow checks
- IsEmpty/IsFull state checks
- Efficient wrap-around behavior using modular arithmetic
- Generic type support using Go's
any
type
- Benchmarking Tools: The
cmd/benchmark/
directory contains tools to evaluate the performance of different data structure implementations. For example,cmd/benchmark/hashtable_benchmark.go
provides benchmarks for hash table implementations.
This repository is created for my personal learning purposes. The implementations are not intended for production use.