Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Do you have any example implementations of the what you're describing? I've never seen a binary tree implemented in this way before; the most "famous" implementation I've seen is the RB Tree in the Linux kernel and it uses left/right members.
See CLR is also using left/right for its not-quite-binary-tree in SortedSet. Though this also uses the Enum-As-Discriminator trick instead of boolean/array. I know the JVM also has/uses left/right but I can't find the backing source file right now.
You can write to pointers you know? Though pointer-swapping is always a barrel of fun and recommended against doing, unless you are a special kind of wizard who wrote DTrace and their own OS: avl.c