Trending

Merge Sort

Merge sort is a sorting technique that is based on the divide and conquer method. It is one of the most respected algorithms, with a worst-case time complexity of O(n log n). Merge sort divides the array into equal parts before combining them in a sorted fashion. Algorithm Merge sort keeps on dividing the list …

Merge Sort Read More »

Selection Sort

Selection sort is a straightforward sorting algorithm. This sorting method is an in-place comparison-based algorithm that divides the list into two halves, the sorted part on the left end and the unsorted part on the right. Initially, the sorted section is empty, while the unsorted section contains the complete list. The smallest element from the …

Selection Sort Read More »

Insertion Sort

This is a sorting algorithm that uses in-place comparisons. A sub-list is kept here that is always sorted. For instance, the lower part of an array is kept in order to be sorted. An element that is to be ‘inserted’ into this sorted sub-list must first identify its right spot and then be inserted there. …

Insertion Sort Read More »