Skip to content · ⁨Passer au contenu⁩

Linear search and bubble sort · ⁨Recherche linéaire et tri bulle⁩

English

Find one mark, then order the list

  • Syllabus topic 10.2 asks for two algorithms on an array: a linear search and a bubble sort.
  • A linear search looks at every cell. Remember the index when the value matches. If it never matches, the index stays 0.
  • Searching does not move the values. Sorting does.
Français

Trouver une note, puis ordonner la liste

  • Programme 10.2 demande deux algorithmes sur un tableau : une recherche linéaire et un tri à bulles.
  • Une recherche linéaire examine chaque case. Retenez l'index lorsque la valeur correspond. Si cela ne correspond jamais, l'index reste 0.
  • La recherche ne déplace pas les valeurs. Le tri le fait.

Handout · ⁨Fiche de cours⁩

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP