# Introduction to Searching in Data Structure

\$\$/\$\$

In this module, you will learn various algorithms on two very important techniques, namely ‘searching’ and ‘sorting’.

Now, there are various algorithms designed for the implementation of each technique. You will go through most of them and see which one is the best. This analysis will be done based on what you already learnt about Big O in the Algorithm Analysis module. You will learn that using the divide and conquer technique is of immense help when it comes to improving the efficiency of algorithms.

Primarily, we will discuss the following in this module:

• Searching

• Linear search

• Binary search

• Sorting

• Bubble sort

• Selection sort

• Insertion sort

• Merge sort

• Quick sort

## In this session

This session will cover search techniques. You will learn two techniques, namely ‘linear search’ and ‘binary search’. So let’s begin.

## People you will hear from in this session

Subject Matter Expert

Aishwarya Rai
Ex-Product Engineer, EdgeVerve
She worked as a software developer for Finacle at Edgeverve and helped in creating financial and e-banking software applications. She is currently working with Software Development content team at UpGrad.

Industry Expert

Ankit Maheshwari

ImpactRun is a fitness philanthropy Android application in which your every walk or run raises funds for a social cause you care about.

Presenter
Rachit Goyal

\$\$/\$\$

So, as Ankit discussed, it is very important to optimise the search technique you use, especially when dealing with big data sets. Also, Ankit talked about one of the regular tasks he used to work on at his previous organisation. He then talked about two important queries:

1. To fetch the score of the user, based on the email ID

2. To fetch the top k players on the leaderboard

## Video Transcript

The two most important queries which we received in our system were the first one was get my score. That request had an email address and we had to fetch the score of the user based on the email address. The second query was Get top k players. That request had a parameter k and we had to fetch the top k players in the leaderboard. And both of these queries had to be as fast as possible. These sort of requests are pretty common when you are designing leaderboards. Whatever you learned in this module will be of immense help to you in solving such problems.

## Video Recap

• This module teaches the divide and conquer technique for algorithm design optimization.

• The module covers searching and sorting algorithms, optimizing them using divide and conquer.

• The first session covers searching for elements in datasets using efficient algorithms to save time.

• The next session covers sorting techniques using divide and conquer.

• Algorithm efficiency is measured using Big O notation.