Implementation of various data structures and algorithms in Go.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Emir Pasic 50875b13a8 Update README.md 11 years ago
maps hashmap implemented (inc. tests) 11 years ago
sets hashmap implemented (inc. tests) 11 years ago
stacks array stack (with tests and benchmarks - kinda slow in comparison to the linked list stack) 11 years ago
trees/redblacktree red-black tree Clear() method 11 years ago
utils - comparator test for custom comparator 11 years ago
.gitignore - gitignore update 11 years ago
.travis.yml Update .travis.yml 11 years ago
LICENSE Initial commit 11 years ago
README.md Update README.md 11 years ago

README.md

Build Status

GoDS (Go Data Structures)

Implementation of various data structures in Go.

Implementations

  • Sets:
    • HashSet (unordered)
    • TreeSet (ordered)
  • Stacks:
    • LinkedListStack
    • ArrayStack
  • Maps:
    • HashMap (unordered)
    • TreeMap (ordered)
  • Tree:
    • RedBlackTree

Motivations

Collections and data structures found in other languages: Java Collections, C++ Standard Template Library (STL) containers, Qt Containers, etc.

Goals

Fast algorithms:

  • Based on decades of knowledge and experiences of other libraries mentioned below.

Memory efficient algorithms:

  • Avoiding to keep consume memory by using optimal algorithms and data structures for the given set of problems.

Easy to use library:

  • Well-structued library with minimalistic set of atomic operations from which more complex operations can be crafted.

Stable library:

  • Only additions are permitted keeping the library backward compatible.

Solid documentation and examples:

  • TODO

Production ready:

  • TODO

There is often a tug of war between speed and memory when crafting algorithms. We choose to optimize for speed in most cases within reasonable limits on memory consumption.

Testing and Benchmarking

go test -v -bench . -benchmem -benchtime 1s ./...

License

Copyright (c) Emir Pasic, All rights reserved.

GNU Lesser General Public License Version 3, see LICENSE for more details.