corrected treeSizeRec cause previously end of non void function could be reached

This commit is contained in:
Jonas Hofmann 2025-12-11 08:04:43 +01:00
parent 284cdbdcfb
commit 9a79ff0ad4
3 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,6 @@
* `nextTreeData`: Traversierung mit Hilfe des zuvor implementierten Stacks. Done */
static TreeNode *root = NULL;
static StackNode *stackRoot = NULL;
@ -185,5 +184,7 @@ int treeSizeRec(const TreeNode *currentNode)
nodeCount += treeSizeRec(currentNode->right);
return nodeCount + 1;
}
return nodeCount;
}

BIN
bintree.o

Binary file not shown.

Binary file not shown.