Does it need sorting first
Exercise and reference answers
- Questions
- Answer
- Needs sorted
- Question
- Binary search
- Choices
- Needs sorted
- Any order
- Answer
- Any order
- Question
- Linear search
- Choices
- Any order
- Needs sorted
- Answer
- Needs sorted
- Question
- Halving the list each step
- Choices
- Needs sorted
- Any order
- Answer
- Any order
- Question
- Checking elements one by one
- Choices
- Any order
- Needs sorted
- Answer
- Needs sorted
- Question
- Comparing against the middle
- Choices
- Needs sorted
- Any order
- Answer
- Any order
- Question
- An exhaustive scan
- Choices
- Any order
- Needs sorted
- Instructions
- Pick the right answer each time. Too many wrong picks and the tower falls.
Explanation
_Source: syllabus Computer Science, Ch 5 'Sorting' and Ch 6 'Searching'_