Add some debug as insert appears to be broken
parent
a34b7e968b
commit
7ca975d6a0
|
@ -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;
|
BST_node* searchNode = m_root;
|
||||||
// basically we are iterating through the tree looking for a valid node to insert into.
|
// basically we are iterating through the tree looking for a valid node to insert into.
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -146,6 +146,10 @@ namespace blt {
|
||||||
return inOrderTraverse(m_root);
|
return inOrderTraverse(m_root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BST_node* debug(){
|
||||||
|
return m_root;
|
||||||
|
}
|
||||||
|
|
||||||
~node_binary_search_tree() {
|
~node_binary_search_tree() {
|
||||||
delete (m_root);
|
delete (m_root);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue