Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 6

LINEAR SEARCH

LINEAR SEARCH
also known as Sequential Search, is a straightforward searching algorithm that finds the position
of a target element within a list by checking each element in sequence until a match is found or
the entire list has been searched.
LINEAR SEARCH | Key Characteristics
Sequential Nature
•Linear search examines each element one by one in a sequential manner.

•It starts from the beginning and progresses until the target element is found or the end of the list
is reached.

Memory Efficiency
•Linear search does not require additional memory space beyond a few variables for iteration and
comparison.
•It is an "in-place" algorithm as it does not need extra storage.
LINEAR SEARCH | Key Characteristics
Worst-Case Time Complexity:
•The worst-case time complexity of linear search is O(n), where n is the number of elements in
the list.
•In the worst scenario, the target element is either at the end of the list or not present.

Simple Implementation:
•The algorithm is simple and easy to implement, making it a good choice for small lists or when
efficiency is not a critical concern.
APPLICATION
ACTIVITY:
1. Create your own array using String elements that
applies linear search application. User must search
of 3 or more key in the index.
2. ?

You might also like