List Headline Image
Updated by Santosh Sahu on Aug 25, 2020
 REPORT
Santosh Sahu Santosh Sahu
Owner
2 items   1 followers   1 votes   0 views

Algorithms

In mathematics and computer science, an algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to solve a class of problems or perform a computation. Algorithms are independent of programming languages and can be implemented in more than one programming language. Few of the commonly used algorithms are sorting algorithms, searching algorithms, etc.

Source: https://www.alphacodingskills.com/algo/algo-tutorial.php

Bubble sort is the simplest sorting algorithm. The Bubble sort is based on the idea that every adjacent elements are compared and swapped if found in wrong order.

Insertion sort is based on the idea of consuming one element from unsorted array and inserting it at the correct position in the sorted array. This will result into increasing the length of the sorted array by one and decreasing the length of unsorted array by one after each iteration.