Knock out the true statements
Exercise and reference answers
- Questions
- Question
- Eliminate the true statements about searching.
- Choices
- Item
- Binary search runs on an unsorted list
- Correct
- Yes
- Explanation
- It is exhaustive, comparing each element with the key.
- Item
- Linear search compares every element
- Explanation
- One half cannot hold the key, so it is ignored.
- Item
- Binary search discards half each step
- Explanation
- An index is computed rather than the list scanned.
- Item
- Hashing makes searching very efficient
- Instructions
- Remove the statements that are true. One false one should survive.
Explanation
_Source: syllabus Computer Science, Ch 5 'Sorting' and Ch 6 'Searching'_