Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cours
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
algorithmique
cours
Merge requests
!2
Nouvelle correction de l'algo de recherche
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Nouvelle correction de l'algo de recherche
pk
into
master
Overview
3
Commits
3
Pipelines
2
Changes
1
Merged
pierre.kunzli
requested to merge
pk
into
master
3 years ago
Overview
3
Commits
3
Pipelines
2
Changes
1
Expand
Correction de l'algo de recherche, version plus claire
Edited
3 years ago
by
pierre.kunzli
0
0
Merge request reports
Compare
master
version 1
b4f397c3
3 years ago
master (base)
and
latest version
latest version
abd92514
3 commits,
3 years ago
version 1
b4f397c3
2 commits,
3 years ago
1 file
+
6
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
slides/cours_15.md
+
6
−
6
Options
@@ -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;
}
}
Loading