Linear search: An algorithm that checks each element in a list sequentially until the target is found or the list ends.
How to apply it: Recognize that linear search works on any list but has a worst-case of n comparisons for a list of n elements.
Course: AP Computer Science Principles · Unit: Algorithms and Programming
Practice questions about Linear search on AimFive — get rubric-based feedback showing exactly which points you earned.
AP and Advanced Placement are trademarks of College Board. AimFive is not affiliated with or endorsed by College Board.