June 20, 2016 · 1 min read
Categories: Six weeks training |
So I was trying to create a Merge sort program using JS. Before trying to make the program we first have to understand what is the concept of merge Sort. To get a good example I went to wikipedia where I found very interesting GIF which explained the the basics of Merge sort. In Merge sort you first have to divide the whole list into two halves and keep doing it till the number of values in the each divided list is one. As we know that if there is only one element in the list then we can take it as already sorted. Now we are going to recombine them one by one in the similar sense in which we have divided it. While recombining them we will make sure that the element added are sorted. So the program that I created went to some errors and I am still looking into them. Whenever it is complete I will edit this post.
Please share your Feedback:
Did you enjoy reading or think it can be improved? Don’t forget to leave your thoughts in the comments section below! If you liked this article, please share it with your friends, and read a few more!