A generic C implementation of a hash table using:
- Associated data is stored alongside each key
- Both key and data are handled generically via void *
- Memory management hooks are provided for flexibility
- Separate chaining for collision handling
- User-provided hash and key comparison functions
- Automatic resizing of the hash table
- Iteration over all entries (unsorted) with user-provided function
A generic C implementation of a sorted doubly linked list where:
- Keys are sorted using a user-provided comparison function
- Associated data is stored alongside each key
- Both key and data are handled generically via void *
- Memory management hooks are provided for flexibility
- Iteration over all entries (ascending or descending) with user-provided function
A generic C implementation of a one-dimensional array data structure (Vector) where:
- Each vector element has a key and value(s) of any type
- Elements may be sorted according to the keys
- Insert at the end or at specified index
- Stable sort (merge sort) and binary search
- Delete by index
- Memory management hooks are provided for flexibility
- Forward & reverse iteration, sorted or unsorted, with user-provided function
A generic C implementation of an ordered set (a collection of unique elements where a total order is defined and maintained over the elements) with the following features:
- AVL tree (named after inventors Adelson-Velsky and Landis): a self-balancing binary search tree.
- Generic
- Replace-on-insert
- Deterministic iteration, all entries or only range from...to
- Zero memory leaks
The code I released here into the public domain may appear in third-party projects. I do not maintain, endorse, or have any affiliation with such projects. Any malicious or deceptive use is unauthorized and should be reported to the hosting platform.
