0% found this document useful (0 votes)
2 views12 pages

Understanding Merge Sort Algorithm

Merge Sort is a Divide and Conquer algorithm used for sorting, which breaks down a list into sublists until each contains a single element, then merges them back into a sorted list. The process involves dividing the problem into smaller parts, solving those parts, and combining the results. This method is efficient and helps in developing recursive algorithm skills.

Uploaded by

K Loren
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views12 pages

Understanding Merge Sort Algorithm

Merge Sort is a Divide and Conquer algorithm used for sorting, which breaks down a list into sublists until each contains a single element, then merges them back into a sorted list. The process involves dividing the problem into smaller parts, solving those parts, and combining the results. This method is efficient and helps in developing recursive algorithm skills.

Uploaded by

K Loren
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Merge Sort Algorithm

OBJECTIVES:

1. Define and understand the concept of merge sort


[Link] the process of merge sort
• Merge Sort is a kind of Divide and Conquer
algorithm in computer programming. It is one
of the most popular sorting algorithms and a
great way to develop confidence in building
recursive algorithms. One of the most
efficient sorting algorithms.
• Merge sort repeatedly breaks down a list into
several sublists until each sublist consists of
a single element and merging those sublists
in a manner that results into a sorted list.
• In Merge Sort, the given unsorted array
with n elements, is divided into n subarrays, each
having one element, because a single element is
always sorted in itself. Then, it repeatedly merges
these subarrays, to produce new sorted subarrays,
and in the end, one complete sorted array is produced.

The concept of Divide and Conquer involves three steps:


• Divide the problem into multiple small problems.
• Conquer the subproblems by solving them. The idea
is to break down the problem into atomic subproblems,
where they are actually solved.
• Combine the solutions of the subproblems to find the
solution of the actual problem.
Another Example:
Let's consider an array with values

You might also like