Open
Description
In this case I get an error:
for (int z = 0; z < 30000; ++z)
{
printf(" Z = %d\n", z);
if (z == 699)
printf("");
data = rand() % 5000 + 220;
rbTree1.insertValue(data);
q.push(data);
rbTree1.preorder();
if (q.size() >= 15)
{
rbTree1.deleteValue(q.front());
q.pop();
}
}
if Z equal 699 deletion fails with segfoult in the flowing
int RBTree::getColor(Node*& node)
{
if (node == NULL)
return BLACK;
return node->color;
}
Metadata
Metadata
Assignees
Labels
No labels