Skip to content
Snippets Groups Projects

Final commit

1 file
+ 10
6
Compare changes
  • Side-by-side
  • Inline
+ 10
6
@@ -188,9 +188,13 @@ void tree_erase(Tree *tree, int age, char *name)
void printTabs(int numTabs)
{
// Insert tabs before printing
for (int i = 0; i < numTabs; ++i)
if (numTabs > 0)
{
printf(" ");
printf(" ");
}
for (int i = 0; i < numTabs - 1; ++i)
{
printf("| ");
}
}
@@ -201,11 +205,11 @@ char *checkChildrenRelationship(Node *parentNode)
{
if (parentNode->left->parent == parentNode)
{
strcpy(result, "left correct, ");
strcpy(result, "left linked, ");
}
else
{
strcpy(result, "left bad, ");
strcpy(result, "left broken, ");
}
}
else
@@ -216,11 +220,11 @@ char *checkChildrenRelationship(Node *parentNode)
{
if (parentNode->right->parent == parentNode)
{
strcat(result, "right correct");
strcat(result, "right linked");
}
else
{
strcat(result, "right bad");
strcat(result, "right broken");
}
}
else
Loading