Search, List & Sorting

Linear Search is a searching algorithm, also known as sequential search, that is suitable for finding a specific value within a data set. This algorithm operates by checking each element of a list until a match is found.

Binary Search, often referred to as the binary search algorithm, is a technique for finding a specific value in a linear array by eliminating half of the data at each step. It is widely used but not exclusively in computer science. When using binary search, the data within the array must be sorted beforehand.

List

A list is the most versatile data type available in Python, which can be written as a comma-separated list of values (items) enclosed in square brackets. An important aspect of lists is that the items within a list do not have to be of the same type.

Sorting

Sorting is a process of rearranging a collection of objects using specific rules. Sorting is also referred to as an algorithm for placing a set of data elements into a specific order based on one or more keys in each element. The sorting methods include:

  • Insertion Sort
  • Selection Sort
  • Bubble Sort
  • Shell Sort
  • Quick Sort
  • Merge Sort

MODULE

Download Module 10