GoDS, which means "Go Data Structures", is an implementation of various data structures and algorithms in Go. It provides a wide variety of containers (Sets, Lists, Stacks, Maps, Trees), sets (HashSet, TreeSet, LinkedHashSet), lists (ArrayList, SinglyLinkedList, DoublyLinkedList), stacks (LinkedListStack, ArrayStack), maps (HashMap, TreeMap, HashBidiMap, TreeBidiMap, LinkedHashMap), trees (RedBlackTree, AVLTree, BTree, BinaryHeap), comparators, and iterators. Containers are either ordered or unordered. All ordered containers provide stateful iterators and some of them allow enumerable functions. A list is a data structure that stores values and may have repeated values. A list backed by a dynamic array that grows and shrinks implicitly. A list where each element points to the next element in the list. A set is a data structure that can store elements and has no repeated values. A Map is a data structure that maps keys to values.
Features
- Based on decades of knowledge and experiences of other libraries
- Avoiding to consume memory by using optimal algorithms and data structures for the given set of problems
- Well-structured library with minimalistic set of atomic operations from which more complex operations can be crafted
- Only additions are permitted keeping the library backward compatible
- Learning by example, used in production, with no external imports
- It optimizes for speed in most cases within reasonable limits on memory consumption