An implementation of binary search trees / RBtrees in C23 that should be decently portable.
  • C 96.9%
  • Makefile 3.1%
Find a file
2026-05-22 18:59:37 -04:00
.clangd Inital Commit 2026-05-22 18:59:37 -04:00
.gitignore Inital Commit 2026-05-22 18:59:37 -04:00
bstree.c Inital Commit 2026-05-22 18:59:37 -04:00
bstree.h Inital Commit 2026-05-22 18:59:37 -04:00
LICENCE.txt Inital Commit 2026-05-22 18:59:37 -04:00
main.c Inital Commit 2026-05-22 18:59:37 -04:00
Makefile Inital Commit 2026-05-22 18:59:37 -04:00
rbtree.c Inital Commit 2026-05-22 18:59:37 -04:00
rbtree.h Inital Commit 2026-05-22 18:59:37 -04:00
README.md Inital Commit 2026-05-22 18:59:37 -04:00

Freestanding Trees

An implementation of binary search trees / RBtrees in C23 that should be decently portable.

The trees are intrusive data stuctures

Look at main.c and bstree.h for how to use

rbtree.h is more of a private header and the main interface resides in bstree.h and if the tree type is properly set to an rbtree it will invoke the proper functions to balance and keep it balanced.

You should not change the type of a non empty tree.