Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Binary search » ?

Definition 28.3 Primary & Middle School Computer Science · Chapitre 28 — Searching and Sorting

A binary search looks for an item in a sorted list by comparing it with the middle item, then going on in the half where it must be, and halving again until it is found or no item is left.

Binary search for 77 among 16 sorted numbers: each bracket is the part still searched, from low to high, and the red dot the middle item compared. Four steps.
Binary search for 77 among 16 sorted numbers: each bracket is the part still searched, from low to high, and the red dot the middle item compared. Four steps.
Lire dans le chapitre →