Add some debug as insert appears to be broken

v1
Brett 2023-01-10 22:16:57 -05:00
parent a34b7e968b
commit 7ca975d6a0
1 changed files with 5 additions and 1 deletions

View File

@ -61,7 +61,7 @@ namespace blt {
}
}
BST_node* search(BST_node*& parent, const T& element) {
BST_node* search(BST_node*& parent, const T& element) const {
BST_node* searchNode = m_root;
// basically we are iterating through the tree looking for a valid node to insert into.
while (true) {
@ -146,6 +146,10 @@ namespace blt {
return inOrderTraverse(m_root);
}
BST_node* debug(){
return m_root;
}
~node_binary_search_tree() {
delete (m_root);
}