A linear search is a simple searching algorithm that checks each element in a list or array one by one until the target value is found or the end of the list is reached.
Imagine you are looking for your favorite book in a bookshelf. You start from the first book and check each book, one by one, until you find your favorite book or reach the end of the shelf.
Sequential Search: Another term for linear search. It refers to searching through elements in a sequential order until finding the desired value.
Complete Traversal: The process of examining every element in a data structure, such as an array or list, without stopping early even if the target value is found.
Binary Search: A more efficient search algorithm that divides a sorted list into halves and compares the middle element with the target value to determine which half to continue searching.
Study guides for the entire semester
200k practice questions
Glossary of 50k key terms - memorize important vocab
© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.