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
!5
Pk
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Pk
pk
into
master
Overview
0
Commits
11
Pipelines
1
Changes
1
Merged
pierre.kunzli
requested to merge
pk
into
master
3 years ago
Overview
0
Commits
11
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Viewing commit
72d5729e
Prev
Next
Show latest version
1 file
+
6
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
72d5729e
fix parent search algo
· 72d5729e
Pierre Kunzli
authored
3 years ago
slides/cours_15.md
+
6
−
0
Options
@@ -883,6 +883,10 @@ arbre position(arbre, clé)
suivant = droite(arbre)
tant que clé(arbre) != clé && est_non_vide(suivant)
arbre = suivant
si clé < clé(arbre)
suivant = gauche(arbre)
sinon
suivant = droite(arbre)
returne arbre
```
@@ -921,6 +925,8 @@ tree_t position(tree_t tree, key_t key) {
current->left;
while (key != current->key && NULL != subtree) {
current = subtree;
subtree = key > current->key ? current->right :
current->left;
}
}
return current;
Loading