BinarySearchTreeExercises
Practicing with Binary Search Trees (by sethvan)
MGCLib
A C++ Library of commonly used containers and libraries (by maxgoren)
BinarySearchTreeExercises | MGCLib | |
---|---|---|
6 | 2 | |
0 | 1 | |
- | - | |
0.0 | 0.0 | |
about 2 years ago | almost 2 years ago | |
C++ | C++ | |
GNU General Public License v3.0 only | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
BinarySearchTreeExercises
Posts with mentions or reviews of BinarySearchTreeExercises.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-15.
-
How does one learn low latency programming?
Trippy and kind of cool. Don't remember if I knew that. I did make this red black tree map last May though. The only problem is I wrote the code without the key being const, but because a major part of my tree changing methodology was using std::swap which at the time I couldn't figure out how to replicate involving a const key, I left it that way. Partially it was due to the basis coming from following a tutorial in Java I think. But since it was only affecting me at the time with the iterator, I did a hack with some lambdas to make the iterator operators work like this:
-
General programming question, but asking it here as I suspect every language community is a little bit different. What is the correct balance between (extracting out as much logic as possible to other functions + making one's variable/method names explain the code) and (writing detailed comments)?
This is theDS project that I have spent 2 weeks on and have not commented almost at all on. A red black tree map, I did not have anything well defined concerning how much I was going to end up doing with it, so it has evolved into what it is now. If I do anything more with it, it will probably be just to add in the rest of the special members and maybe 2 unary operators (+ and -) to the Iterator.
-
Against my expectations, the code on top is noticeably slower than the code on the bottom, why?
Regarding the formatting, it took me a little while but I installed clang-format and went through the options, it was close between google and gnu but I went with google. Does this look better? This is my current version of this class from my repository. RedBlackTree
-
Is my version of this binary search tree erase() method monstrous because I'm still a noob or because it's going to be long no matter what or both?
The ordeal I have had with it makes me feel like it's full of duct tape and zip ties TBH. I am not in the know of benchmarking but using some timer class I found by googling; the run times for insertion and deletion of elements seem comparable between my raw version and the std::set. But like I indicated earlier, it is not a template class and we are only working with ints here. What I am wondering though is if an ideal erase() method is supposed really to be anywhere as long as mine turned out to be? Because seriously I felt like a dutch boy plugging holes on this thing for hours hahaha. Methods are below and entire class is available here https://github.com/sethvan/BinarySearchTreeExercise .
MGCLib
Posts with mentions or reviews of MGCLib.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-04-29.
-
Against my expectations, the code on top is noticeably slower than the code on the bottom, why?
I did not go with the left leaning version you attached because the paper intimidated me as soon as it mentioned 2-3 trees which I was not familiar with, however I have been slightly glancing at the repository from 2022 (which is where I based my node off of in part). Two observations I have made of that class and another piece of code https://pastebin.com/7GGFiaEc I had looked at for an AVL tree in C is that first I think it is very cool that they have so many functions that return a node value back to it's own variable like node = doSomething(node) so to speak instead of all the void methods that I have been doing (not only on my own but that this professor also showed for my present version of a red black tree here https://pastebin.com/m1aG7w4s ). So that's cool and suspect I need to try and think more in that mannner. BUT.... in neither of those versions do I see any memory being deleted or free'd nywhere. So i am confused, Why is there no destructor in this guy https://github.com/maxgoren/MGCLib/blob/main/mgc_redblack.hpp and why is nothing being deleted anywhere that I can see?
What are some alternatives?
When comparing BinarySearchTreeExercises and MGCLib you can also consider the following projects:
Heap-Layers - Heap Layers: An Extensible Memory Allocation Infrastructure
Options - My first C Project, a console app