This is a collection of basic structures for academic purposes. These are the implemented ones right now:
- Linked List
- Hash
- Trie Tree
- Binary Search Tree
The list is doubly linked, and supports adding, removing and finding by key.
The hash structure solves collisions by chaining, with the hash table being pointers to linked lists. This linked list starts with a sentinel for easier support of removing nodes.
It supports adding and removing void pointer values (everything) using string keys, copying the value into new memory.
The trie tree structure works very much like a hash, but the storage mechanism is more closely related to a tree. It supports void pointer values as well.
The binary search tree supports adding and deleting nodes, and finding by key, successors, predecessors, maximums and minimums.
To test just make && make test
.