{ Test de la présence d'une valeur entiere } { dans un tableau d'entiers trie } { par ordre croissant } { Methode dichotomique } { Retour de vrai si présent, faux sinon } { v : Entier recherché } { t : Le tableau d'entiers de recherche } { (trié par ordre croissant) } booleen fonction estPresent(-> entier v, -> entier [] t) booleen run <- vrai booleen trouve <- faux entier indi <- 0 entier indf <- longueur(t)-1 entier indm tantque run == vrai faire si indf == indi alors si t[indi] == v alors trouve <- vrai fsi run <- faux sinon si indf == indi+1 alors si t[indi] == v ou t[indf] == v alors trouve <- vrai fsi run <- faux sinon indm <- (indi+indf)/2 si t[indm] == v alors run <- faux trouve <- vrai sinon si v < t[indm] alors indf <- indm-1 sinon indi <- indm+1 fsi fsi fsi fsi fait retourner trouve fin fonction