171,835 views 344 on YTPak
545 108

Published on 28 Feb 2014 | over 3 years ago

In this video we will learn merge sort algorithm which recursively sorts an unsorted array.
Tutorial: www.dyclassroom.com/sorting-algorithm/merge-sort
Subscribe: goo.gl/cFA9in


0:05 Introduction to Merge Sort
0:19 Merge Sorting is done recursively
0:38 Understanding merge sort with an example
0:48 Initially take an unsorted array (5, 4, 3, 1, 2, 6)
0:52 We take two variables beg and end
1:00 Finding the mid value to divide the array into two halves
1:06 The 1st mid value and split (5, 4, 3) | (1, 2, 6)

1:12 Considering the left sub half (5, 4, 3)
1:32 The 2nd mid value and split (5, 4) | (3)
1:38 Considering the left sub half (5, 4)
1:52 The 3rd mid value and split (5) | (4)
2:14 The 1st sort (4, 5)
2:40 The 2nd sort (3, 4, 5)

3:04 Considering the right sub array (1, 2, 6)
3:16 The 4th mid value and split (1, 2) | (6)
3:34 The 5th mid value and split (1) | (2)
4:00 The 3rd sort (1, 2)
4:30 The 4th sort (1, 2, 6)

4:50 Merging the Left sub array and the Right sub array
5:16 The array is sorted!

5:19 About Merge Sort
5:36 Algorithm of Merge Sort (Recursive)
6:06 Order of Merge Sort


You can download the source code from my GitHub repository
github.com/yusufshakeel/C-Project

Complete Playlist
www.youtube.com/watch

Related Videos:
-------------------------------
Bubble Sort www.youtube.com/watch

Selection Sort www.youtube.com/watch

Insertion Sort www.youtube.com/watch

For Merging Algorithm
www.youtube.com/watch

Loading related videos...