Skip to content

smekuria1/GoSlow

Repository files navigation

GoSlow

Go Test Go Reference Go Report Card MIT License

GoSlow is combination of multiple packages that each represent popular algorithms and data structures. The goal of this project is to provide a simple and easy to use library for learning and teaching purposes.

Acknowledgements

Binary Search Tree

Usage/Examples

import "github.com/smekuria1/GoSlow/binarysearchtree"
bst := binarysearchtree.NewBST[int]()

Dynamic Array

Usage/Examples

import "github.com/smekuria1/GoSlow/darray"
dynamicarray := darray.NewDynamicArray[int]()

Doubly Linked List

Usage/Examples

import "github.com/smekuria1/GoSlow/doublyLinkedList"
dll := doublyLinkedList.NewDoublyLinkedList[int]()

HashTable(Separate Chaining)

Usage/Examples

import "github.com/smekuria1/GoSlow/hashtable"
ht := hashtable.NewHashTable[int, int](10, 0.75)

Binary Heap Priority Queue

Usage/Examples

import "github.com/smekuria1/GoSlow/priorityqueue"
pq := priorityqueue.NewBinaryHeapPQ[int]()

Queue

Usage/Examples

import "github.com/smekuria1/GoSlow/queue"
q := queue.NewQueue[int]()

Stack

Usage/Examples

import "github.com/smekuria1/GoSlow/stack"
s := stack.NewStack[int]()

Union Find

Usage/Examples

import "github.com/smekuria1/GoSlow/unionfind"
uf := unionfind.NewUnionFind[int](11)

Singly Linked List

import "github.com/smekuria1/GoSlow/singlyLinkedList"
sl := singlyLinkedList.NewSinglyLinkedList[int]()

Running Tests

To run tests for all packages, run the following command in root folder

    go test ./...

To run tests for specific packages, run the following command

    cd <package name>
    go test 

Support

For support, email solmek18@gmail.com or create and issue/pr.

License

MIT

FAQ

Why do this?

I love golang and wanted to excercise my golang muscles while learning about cool data structures and algos.

Roadmap

  • Additional Data Structures and Algos like AVL Trees, Fenwick Trees ....

  • Build Either a CLI or small web app to visually interact with the implementations

  • General improvements to some of the implementations and better error handling