100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary on Merge Sort

Rating
-
Sold
-
Pages
2
Uploaded on
01-04-2023
Written in
2019/2020

In this summary, I have focused on the topic of Merge Sort.

Institution
Course








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Course

Document information

Uploaded on
April 1, 2023
Number of pages
2
Written in
2019/2020
Type
Summary

Subjects

Content preview

Merge Sort
Mergesort is a sorting technique that also works on the
divide and conquers technique as in the quicksort
technique. In this lesson, we will discuss with you the
working of this merge sort with help of an example. The
first step is dividing the given list into sub-lists and the
second step is merging those sub-lists. C merge sort is a
function merge suit is the array we are going to pass
lower bound and upper bound this is lower bound. If two
elements are there then you're going to divide that
particular list into sub-lists. Then each sub-list is having
only one element and that is the condition you have to
stop dividing you will keep on dividing the sub-list. The
main thing is you have to write down the code for this
merge function that is the backbone of the merge
function and how we are going to merge these arrays.
The code is a recursion call to the left part n to the right
part so this is a call to a recursive call.

Midpoint is midpoint fine so here we call merge sort 0 -
middle element is 0 because 0 plus 1 that is 1 1 divided
by 2 is 0 and then again merge sort 1 to 1 and again we
are going to call merge methadone 0 metal point is lower
bound is 0. This is the recursive tree now how this is
going to be called see first of all massive of 0 to 8 here
we have a first cold would we do this function 0 to 4
again for the first sorting of this one? We are going to call
merge 5 then 5 and then 6 fine lower bound is 5 mid is
also 5 and the upper bound is six now seven 8 7 is less
than this yes this condition is true. We are going to merge
this list with its adjacent list only and when you're going
to draw this recursion tree then you come to know how
we are. merging these sub-lists will be merged this and
$7.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
jeffrinsaiju2004

Get to know the seller

Seller avatar
jeffrinsaiju2004 Exam Questions
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
2 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions