c++2-3-4-tree

C++ implementation of 2-3-4 Trees


I was looking for C++ implementation of 2-3-4 Trees online and was surprised that
There is no code available for it. I couldn't find anything. I have studies this Trees
But writing code is difficult for me as of now so I wanted to look at some already
implemented code. Is there an easy way to implement it using a 2-3 Tree or some other
existing Data Structure or one has to start from scratch to implement it ?
Any links/references or ideas will help


Solution

  • You're unlikely to find a production-quality implementation. A red-black tree is an isomorphic structure to a 2-3-4 tree, and is more efficient and easier to work with. So you'll find plenty of RB trees, and they're basically the same thing. (You could rework a RB tree into a 2-3-4 tree but that would just make it worse.)