Linear Search & Binary Search — Data Structure
4 min readAug 20, 2020
There are two algorithms to search an element in a data structure such as an array namely, linear search and binary search.
Linear Search
Linear search also known as sequential search. Linear search is a simple searching algorithm.
Here, the searching occurs from one item after the other. This algorithm checks every item and checks for a matching item of that. If the item is not present, searching continues until the end of the data. Therefore, linear search is an algorithm that allows going through…