Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • algorithmique/cours
  • aurelien.boyer/cours
  • jeremy.meissner/cours
  • radhwan.hassine/cours
  • yassin.elhakoun/cours-algo
  • gaspard.legouic/cours
  • joachim.bach/cours
  • gabriel.marinoja/algo-cours
  • loic.lavorel/cours
  • iliya.saroukha/cours
  • costanti.volta/cours
  • jacquesw.ndoumben/cours
12 results
Select Git revision
Show changes
Commits on Source (3)
......@@ -398,7 +398,7 @@ droite(arbre) -> arbre (sous-arbre de droite)
# Exemple d'arbre binaire
* Représentez `(a * b - c) * (d + e / f)` à l'aide d'un arbre binaire (matrix)
* Représentez `(c - a * b) * (d + e / f)` à l'aide d'un arbre binaire (matrix)
. . .
......@@ -586,7 +586,7 @@ Le noeud est visité à la **remontée**.
## Résultat
```
a * b - c * d + e / f
c - a * b * d + e / f
```
::::
......@@ -877,11 +877,11 @@ int arbre_size(tree_t tree) {
```
arbre position(arbre, clé)
si est_non_vide(arbre)
si clé < clé(arbre)
suivant = gauche(arbre)
sinon
suivant = droite(arbre)
tant que clé(arbre) != clé && est_non_vide(suivant)
si clé < clé(arbre)
suivant = gauche(arbre)
sinon
suivant = droite(arbre)
arbre = suivant
returne arbre
```
......@@ -917,9 +917,9 @@ ajout(arbre, clé)
tree_t position(tree_t tree, key_t key) {
tree_t current = tree;
if (NULL != current) {
tree_t subtree = key > current->key ? current->right :
current->left;
while (key != current->key && NULL != subtree) {
subtree = key > current->key ? current->right :
current->left;
current = subtree;
}
}
......