Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is the entire list. The smallest…
Category: Sorting
Sort algorithms order the elements of an array according to a predefined order. There are different sorting algorithms are available like selection sort, insertion sort, etc. In this article, we learn about all of the sorting algorithms, the working of these sorting algorithms, and examples of these sorting algorithms.
Quick Sort
Sort algorithms order the elements of an array according to a predefined order.Quick sort is a divide and conquer algorithm. In a divide and conquer sortingalgorithm the original data is separated into two parts “divide” which areindividually sorted and “conquered” and then combined. Algorithm: If the array contains only one element or zero elements than…
Merge Sort
There are different sorting algorithms are available like selection sort, insertion sort etc. In this article we learn about one of them sorting algorithm, working of this sorting algorithm and example of this sorting algorithm. Merge sort algorithm is the simplest sorting algorithm as compare to other sorting algorithms. The Merge sorting algorithm can be…
Insertion Sort
There are different sorting algorithms are available like selection sort, insertion sort etc. In this article we learn about one of them sorting algorithm. Also working of this sorting algorithm and example of this sorting algorithm. Insertion sorting algorithm is the simplest sorting algorithm as compare to other sorting algorithms. Insertion sorting is a simple…
Bubble sort
There are different sorting algorithms are available like selection sort, insertion sort etc. In this article we learn about one of them sorting algorithm, working of this sorting algorithm and example of this sorting algorithm. Bubble sort algorithm is the simplest sorting algorithm as compare to other sorting algorithms. In the bubble sorting algorithm, array…