Tick each line when you can do it without looking at the guide. Each line names where it is taught and tested. Revisit the study guide for anything you cannot yet do.
Understanding
- ☐ I can describe linear search in one sentence and say it works on unsorted data (study guide: Looking for something in a collection; practice: Question 7).
- ☐ I can explain why -1 is returned after the loop and not inside it (study guide: The standard pattern; Worked example 2; practice: Questions 3 and 8).
- ☐ I can state the best case, worst case and unsuccessful-search comparison counts (study guide: The standard pattern; practice: Questions 1, 2 and 7).
- ☐ I can explain why Strings are compared with equals (study guide: Worked example 2; practice: Question 4).
Skills
- ☐ I can write a linear search for an array returning an index or -1 (study guide: The standard pattern).
- ☐ I can write a linear search for an ArrayList of Strings (study guide: The standard pattern; practice: Question 9).
- ☐ I can search from the end to find the last match (study guide: Variations; practice: Question 5).
- ☐ I can search a 2D array by row or by nested loops (study guide: Variations; practice: Questions 6 and 10).
Reasoning
- ☐ I can trace a search and say exactly how many comparisons it makes (study guide: Worked example 1; practice: Questions 1 and 2).
- ☐ I can predict the result of a faulty search such as the early else return (practice: Question 3).
- ☐ I can say how a search for every match differs from a search for the first match (study guide: Searching for several matches).
- ☐ I can explain why linear search becomes slow for large collections (study guide: The standard pattern).