This commit is contained in:
mr314ot 2025-11-21 08:07:22 +01:00
parent c2a3eb71a0
commit 6dfe6ba2bc

View File

@ -45,9 +45,8 @@ void destroy_tree(Tree *tree) {
int count_leaves(Tree *tree) {
if (!tree) return 0;
if (!tree->left && !tree->right)
return 1;
return count_leaves(t->left) + count_leaves(t->right);
if (!tree->left && !tree->right) return 1;
return count_leaves(tree->left) + count_leaves(tree->right);
}
// spustenie znalostneho systemu