Fichas
Searching and Sorting - Bubble Sort
Fichas del conjunto (7)
- 1What is a bubble sort?A simple sorting algorithm that goes through all numbers to arrange data
- 2What is the first step in a bubble sort?Compare the first two items. If they are in order, leave them. It they aren't, swap them
E.g 4,2
2 is smaller than 4 so will swap - 3What is the second step in a bubble sort?Repeat step 1 for items 2 and 3 in the list.
- 4What is the third step in a bubble sort?Continue applying step 1 to the rest of the items in the list
- 5When is a pass completed?When it has compared everything once
- 6What happens once a pass is completed?It repeats and until no swaps are required and all the numbers are in order
- 7Why is a bubble sort inefficient?It requires multiple passes through the array, so it can be unsuitable for large lists
Información
- Descripción
- GCSE (Paper 2) Computing Fichas sobre Searching and Sorting - Bubble Sort, creado por Jack Rogers el 18/04/2018.
- Creado por
- Jack Rogers
- Visitas
- 0
- Valoración