Skip to content
Snippets Groups Projects

Update cours_21.md (modif fonction qt_create)

1 file
+ 5
4
Compare changes
  • Side-by-side
  • Inline
+ 5
4
@@ -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;
}
Loading