Linear or binary search
Exercise and reference answers
- Categories
- Linear
- Binary
- Questions
- Answer
- Linear
- Question
- Checks every element
- Answer
- Binary
- Question
- Halves the list each step
- Answer
- Binary
- Question
- Needs a sorted list
- Answer
- Linear
- Question
- Works on any order
- Answer
- Linear
- Question
- The simplest method
- Answer
- Binary
- Question
- Looks at the middle first
- Instructions
- Pull each description towards the search it fits.
Explanation
_Source: syllabus Computer Science, Ch 5 'Sorting' and Ch 6 'Searching'_