Now let’s try to implement some other sorting algorithms. Let’s start with selectsort. We have a list of elements that we want to sort. We can divide it into two parts, sorted and unsorted. In selectsort in each step we have to select smallest element from the unsorted part of the list and put it […]
Tag Archives: Mergesort
In this article, we will discuss about the Mergsort algorithm. The Mergersort algorithm is much more efficient than some of the other sorting algorithms.
The Mergesort works by sorting and merging two arrays into one. The basic concept of the Mergesort algorithm is the merging of two already sorted-arrays into one array. In the next section, will show how merging works in the Mergesort algorithm.