Skip to content
Snippets Groups Projects
Commit 70ae27e2 authored by yassin.elhakoun's avatar yassin.elhakoun
Browse files

Update cours_21.md (modif fonction qt_create)

parent e9b95e99
No related tags found
No related merge requests found
Pipeline #31686 failed
......@@ -197,11 +197,12 @@ arbre creer_arbre(prof)
```C
node *qt_create(int depth) {
if (depth <= 0) {
return NULL;
}
node *n = calloc(1, sizeof(node));
if (depth > 0) {
for (int i = 0; i < 4; ++i) {
n->child[i] = qt_create(depth-1);
}
for (int i = 0; i < 4; ++i) {
n->child[i] = qt_create(depth-1);
}
return n;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment