Searching for data can be very difficult. Searching algorithms, such as linear search (also known as serial search) and binary search, make the process of searching for data much easier.
We often need to find one particular item of dataUnits of information. In computing there can be different data types, including integers, characters and Boolean. Data is often acted on by instructions. amongst many hundreds, thousands, millions or more. For example, you might need to find someone’s phone number on your phone, or a particular business’s address in the UK.
This is why searching algorithmA sequence of logical instructions for carrying out a task. In computing, algorithms are needed to design computer programs. are important. Without them you would have to look at each item of data – each phone number or business address – individually, to see whether it is what you are looking for. In a large set of data, it will take a long time to do this. Instead, a searching algorithm can be used to help find the item of data you are looking for.
Figure caption,
Search algorithms prevent you from having to look through lots of data to find the information you are searching for
There are many different types of searching algorithms. Two of them are linear search (also known as serial search) and binary search.