Fiveable
Fiveable

Sequential Search

Definition

Sequential search is another term for linear search, where each element in a list is checked one by one until the target value is found or the end of the list is reached.

Analogy

Imagine you're searching for your favorite song on a playlist. You start from the first song and listen to each song sequentially until you find the one you want or reach the end of the playlist. This is similar to how sequential search works - it checks each element in order until it finds what it's looking for.

Related terms

Indexing: Indexing refers to assigning a unique identifier (index) to each element in a data structure, such as an array or ArrayList. It allows for efficient access and retrieval of specific elements.

Linear Data Structure: A linear data structure organizes elements sequentially, where each element has a direct predecessor and successor. Examples include arrays, linked lists, and stacks.

Unsorted List: An unsorted list refers to a collection of elements that are not arranged in any particular order. Sequential search can be used to find an element within an unsorted list.



© 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.


© 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.