While preparing a talk for Meeting C++ 2025 I've started looking into binary trees. And got curious about a different design choice.
Looking at binary trees in C++
by Jens Weller
From the article:
I'm in the process of preparing a quick talk on trees in C++ for Meeting C++ 2025. In order to see what the web offers, I've searched exactly for this, "trees in C++".
This showed that most posts found by duckduckgo or google were about binary trees, and in particular the same or similar implementation of using raw pointers for the left/right elements in the tree. Including using new to allocate for the nodes, only some times the code also bothers with using delete. The basic node class looks like this:

Add a Comment