small done

v1
Brett 2023-12-19 01:28:59 -05:00
parent 8e701f6953
commit 111ab14b37
1 changed files with 4 additions and 3 deletions

View File

@ -35,7 +35,6 @@ namespace blt
node* left;
node* right;
node(const T& t): val(t)
{}
@ -103,6 +102,7 @@ namespace blt
return;
}
node* search = root;
node* parent = nullptr;
while (true)
{
if (t < search->val)
@ -110,7 +110,7 @@ namespace blt
if (search->left == nullptr)
{
search->left = new node(t);
return;
break;
}
search = search->left;
} else
@ -118,10 +118,11 @@ namespace blt
if (search->right == nullptr)
{
search->right = new node(t);
return;
break;
}
search = search->right;
}
parent = search;
}
}