Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lerarn Data Structures in Go

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.

Implemented Data Structures

Hash Tables

  • 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.

Stack

  • 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

Queue

  • 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

Features

  • 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.

Disclaimer

This repository is created for my personal learning purposes. The implementations are not intended for production use.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages