GoSlow

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 10 Imported by: 0

README

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

Documentation

Overview

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. The library is not intended to be used in production code.

Directories

Path Synopsis
Package binarysearchtree implements a binary search tree data structure.
Package binarysearchtree implements a binary search tree data structure.
Package darray provides an implementation of a dynamic array data structure.
Package darray provides an implementation of a dynamic array data structure.
Package doublyLinkedList provides an implementation of a doubly linked list data structure.
Package doublyLinkedList provides an implementation of a doubly linked list data structure.
Package hashtable implements a hash table data structure using separate chaining for collision resolution.
Package hashtable implements a hash table data structure using separate chaining for collision resolution.
Package priorityqueue implements a priority queue.
Package priorityqueue implements a priority queue.
Package queue implements the queue data structure.
Package queue implements the queue data structure.
Package stack implements the stack data structure.
Package stack implements the stack data structure.
Package UnionFind implements the union find data structure.
Package UnionFind implements the union find data structure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL