This repository contains implementations of various data structures and algorithms in Go programming language. It serves as both a learning resource and a practical reference for developers.
- Linked List - Documentation
- Singly Linked List
- Doubly Linked List
- Circular Linked List
- Iterator Pattern Implementation
- Thread-safe Operations
- Generic Type Support
- Stack - Documentation
- Array-based Implementation
- Linked List-based Implementation
- Thread-safe Operations
- Generic Type Support
- Queue - Documentation
- Array Queue Implementation
- Linked List Queue Implementation
- Priority Queue
- Circular Queue
- Thread-safe Operations
- Generic Type Support
- Tree - Documentation
- Binary Tree
- Binary Search Tree (BST)
- AVL Tree (Self-balancing)
- Red-Black Tree
- B-Tree
- Trie (Prefix Tree)
- N-ary Tree
- Expression Tree
- Thread-safe Operations
- Heap - Documentation
- Binary Heap
- Min Heap
- Max Heap
- Fibonacci Heap
- Binomial Heap
- Priority Queue Implementation
- Thread-safe Operations
- Hash - Documentation
- Hash Table
- Hash Map
- Hash Set
- Consistent Hashing
- Linear Probing
- Quadratic Probing
- Double Hashing
- Separate Chaining
- Thread-safe Operations
- OrderedMap - Documentation
- Thread-safe Implementation
- Order Preservation
- Concurrent Operations Support
- Skip List Implementation
- Advanced Features (Copy, Clear, Range iteration)
- Generic Type Support
- Graph - Documentation
- Adjacency Matrix
- Adjacency List
- Weighted Graph
- Directed Graph
- Undirected Graph
- Graph Algorithms
- Depth First Search (DFS)
- Breadth First Search (BFS)
- Dijkstra's Algorithm
- Bellman-Ford Algorithm
- Floyd-Warshall Algorithm
- Kruskal's Algorithm
- Prim's Algorithm
- Topological Sort
- Strongly Connected Components
- Cycle Detection
🔧 Algorithms - Documentation
- Bubble Sort
- Selection Sort
- Insertion Sort
- Quick Sort
- Merge Sort
- Heap Sort
- Linear Search
- Binary Search (Iterative and Recursive)
- Jump Search
- Interpolation Search
- Exponential Search
- Fibonacci Search
- Go 1.23 or higher
git clone https://github.com/mstgnz/data-structures.git
cd data-structures
go mod download
go test ./...
Contributions are welcome! Please read our Contributing Guidelines for details on how to submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
.
├── algorithms/ # Basic algorithm implementations
├── advanced/ # Advanced data structures
├── examples/ # Usage examples
├── graph/ # Graph implementations
├── hash/ # Hash table implementations
├── heap/ # Heap implementations
├── linkedlist/ # Linked list implementations
├── orderedmap/ # Ordered map implementations
├── queue/ # Queue implementations
├── stack/ # Stack implementations
├── tree/ # Tree implementations
└── utils/ # Utility functions
- Clean and efficient implementations
- Comprehensive test coverage
- Well-documented code
- Generic implementations where applicable
- Performance optimized
- Thread-safe implementations where necessary
- Order preservation in map operations
- Concurrent access support with proper synchronization
- Advanced data structure features (Copy, Clear, Range operations)
Each implementation includes performance considerations and Big O notation analysis in its respective documentation.
See CHANGELOG.md for release history and version details.