Skip to content
/ golibs Public

A loose collection of handcrafted Go implementations of common data structures and algorithms for my own reference and for demonstration purposes.

License

Notifications You must be signed in to change notification settings

fahlke/golibs

Repository files navigation

golibs

CircleCI Codecov GoDoc Go Report Card

A loose collection of handcrafted Go implementations of common data structures and algorithms for my own reference and for demonstration purposes.

But most importantly this repository is created and maintained to have some fun developing stuff and to stay hungry, stay curious!

gopher-logo

Implementations

The lists below are in no particular order and the various implementations are not guaranteed to be "perfect". Everything is implemented for mere self educational purposes and can very likely be improved on.

Abstract Data Types

Type (Wikipedia link) Package Implemented
List (Array) list -
Sorted list sortedlist -
Linked list linkedlist
Queue (FIFO) queue
Stack (LIFO) stack
Max heap (Binary heap) heap/max -
Min heap (Pairing heap) heap/min -
Hash table (hashmap) hashmap
Tree tree -
Trie trie -
Binary search tree binarytree -
B-tree btree -
Undirected graph graph/undirected -
Directed graph graph/directed -

Sorting algorithms

Name (Wikipedia link) Package Implemented
Quicksort sort/quick -
Bubble sort sort/bubble -
Merge sort sort/merge -
Heapsort sort/heap -
Selection sort sort/selection -
Insertion sort sort/insertion -
Cocktail shaker sort sort/cocktailshaker -
Shellsort sort/shell -
Radix sort sort/radix -

Hashing algorithms

Name (Wikipedia link) Package Implemented
SHA-256 hash/sha256 -
MD5 hash/md5 -
Pearson hashing hash/pearson
CRC-32 hash/crc32 -
MurmurHash hash/murmur -
SpookyHash  hash/spooky -

String metrics

Name (Wikipedia link) Package Implemented
Levenshtein string/metric/levenshtein -
Hamming string/metric/hamming -
N-Gram string/metric/ngram -

String searching

Name (Wikipedia link) Package Implemented
Aho–Corasick string/search/ahocorasick -

Utilities

Function Package Implemented
Mix util
Max util

About

A loose collection of handcrafted Go implementations of common data structures and algorithms for my own reference and for demonstration purposes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published