All Questions
6
questions
4
votes
1
answer
1k
views
Iterative Red-Black Tree (dynamic stack)
I've completely reworked the previous code, posted here, so that it is a bit more correct regarding dynamic memory management, and also a bit more true to the object-oriented paradigm.
...
4
votes
2
answers
2k
views
Memory management for Red-Black Tree
I've written this program yesterday, and I was reminded why I dreaded C++ before turning to Java: pointers and associated terms (like destructors, initializations and copy/move constructors) are ...
6
votes
1
answer
561
views
Specialty tree structure - BK Tree
I've been working on a implementation of specialty tree structure called a BK-Tree (more here and here). Basically, it's a tree that allows relatively efficient querying for items within a specific ...
14
votes
2
answers
2k
views
Free a binary tree without using recursion or allocating memory
As the title says, the objective is to free a binary tree without using the stack or allocating memory.
This was required for a kernel module where resources were limited.
Result has a complexity of \...
0
votes
1
answer
4k
views
Breadth-first tree traversal using STL list
I am writing code for breadth-first search of a tree with C++'s STL. Please help as I am new to the STL.
...
3
votes
2
answers
3k
views
Tree Node class - deallocation in the destructor
Is my destructor correct? Does it properly deallocate the subtrees?
...