Sorting and searching bingo
Exercise and reference answers
- Clues and terms
- Clue
- Arranging a collection of elements into some order.
- Item
- Sorting
- Clue
- One full iteration through every element of a list.
- Item
- Pass
- Clue
- Changing the positions of two elements with each other.
- Item
- Swap
- Clue
- Repeatedly compares neighbours and swaps them if unordered.
- Item
- Bubble sort
- Clue
- The sort that makes n minus one passes over the list.
- Item
- Selection
- Clue
- The simplest method, comparing every element with the key.
- Item
- Linear search
- Clue
- Halves the list each step, but needs it sorted first.
- Item
- Binary search
- Clue
- The item being searched for in the list.
- Item
- Key
- Clue
- A formula giving the index at which a value belongs.
- Item
- Hash function
- Instructions
- Read each clue and tap the term it describes.
Explanation
_Source: syllabus Computer Science, Ch 5 'Sorting' and Ch 6 'Searching'_