3 ms·
Lol, I made a C library on this very topic years twenty years ago. http://www.kylheku.com/~kaz/austin.html http://www.kylheku.com/~kaz/austin.html "Austin" pr
by kazinator 8y ago
Lol, I made a C library on this very topic years twenty years ago.
http://www.kylheku.com/~kaz/austin.html http://www.kylheku.com/~kaz/austin.html
"Austin" provides several container data structures in a single instance. With a function call it can be instructed to change the representation from any one of them to any other. E.g. a red-black tree can be told to become an AVL tree or sorted list and so on.
When I wrote this and announced it, a gentleman from Austria named Carl Van Tast contributed the AVL. I've not encountered him since; I remember telling him it was Van-Tast-ic. That could why I haven't encountered him since.
The API is in "udict.h" (universal dictionary). The algorithms are enumerated thus:
#define UDICT_LIST 0
#define UDICT_BST 1
#define UDICT_REDBLACK 2
#define UDICT_SPLAY 3
#define UDICT_AVL 4