Implementation of classic algorithms and data structures from the CLRS (Introduction to Algorithms) book, written in Go.
This repository contains Go implementations of algorithms and data structures covered in the CLRS textbook, organized by topic.
Each implementation aims to be:
- Simple and idiomatic Go
- Well-documented with comments
- Educational, matching the logic from the book
- Arrays and Basic Operations (sum, Matrix Multiply)
- Sorting algorithms (Insertion Sort, MergeSort, QuickSort, Randomized QuickSort, HeapSort)
- Divide-and-Conquer algorithms (Matrix Multiply)
- Elementary Data Structures (Stack, Queue, LinkedList, Heaps(min/max))
- Greedy algorithms (Activity Selector, Fractional Knapsack, Huffman, Offline Caching)
- More topics coming soon...
Pull requests and discussions are welcome — feel free to add new algorithms or improve existing ones.
Introduction to Algorithms, 4th Edition
by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein
This project is licensed under the MIT License.