Learnmonkey Learnmonkey Logo

Searching

In this tutorial, we'll learn about searching and search algorithms.

What is Searching?

In programming, searching is simply looking for an element or a collection of elements in a Data Structure, normally a list. It's like looking for an recipe in a cookbook. THe different algorithms we use for Searching can be simple and complex. It all depends on the method used for Searching.

Why use Searching?

In programming, Searching is very important, but why? Well, let's say you recorded the favorite number of n people, and you want to find the first person who likes the same number as you, 32. Sure, you could read over the list and find the number 32, but that would take long. You can imagine that reading even a hundred numbers can be time-consuming, and you may even have bigger data sets of numbers. This is when Searching comes in. We can write simple programs to find occurences of data for us.

Different Search Algorithms

Here are the Search Algorithms we'll go over in this tutorial series. However, do note that there TONS! of other Search Algorithms, but these are the most popular ones: