SlideShare a Scribd company logo
Merge Sort
Merge sort is a sorting technique based on divide and conquer technique.
With worst-case time complexity being Ο(n log n), it is one of the most
respected algorithms.
Merge sort first divides the array into equal halves and then combines them
in a sorted manner. Mergesort is a algorithm that was invented by John von
Neumann in 1945
Algorithm
Merge sort keeps on dividing the list into equal halves until it can no
more be divided. By definition, if it is only one element in the list, it is
sorted. Then merge sort combines smaller sorted lists keeping the
new list sorted too.
Step 1 − if it is only one element in the list it is already sorted, return.
Step 2 − divide the list recursively into two halves until it can no more
be divided.
Step 3 − merge the smaller lists into new list in sorted order.
UML Scheme

More Related Content

PPTX
Sorting types and Algorithms
PPTX
Arrays
 
PPT
lecture 9
PPTX
sorting and its types
PPTX
Lecture 4.4 bt
PPTX
Merge sort analysis and its real time applications
PDF
Merge sort
PPTX
Mergesort
Sorting types and Algorithms
Arrays
 
lecture 9
sorting and its types
Lecture 4.4 bt
Merge sort analysis and its real time applications
Merge sort
Mergesort

Viewers also liked (20)

PPT
Merge sort
PPTX
Merge sorting v2
PPT
simple-sorting algorithms
PPT
PPTX
Sorting
PDF
Bin Sorting And Bubble Sort By Luisito G. Trinidad
PPTX
Merge sort algorithm
PDF
Sorting bubble-sort anim
PPTX
Marge Sort
ODP
Sorting Algorithm
PPT
Bubble sort
PPTX
Sorting algorithms
PPTX
Sorting techniques Anil Dutt
PPTX
Sorting (Bubble,Merge,Selection sort)
PPT
Bubble sort
PPT
3.1 bubble sort
PDF
Sorting
PPTX
bubble sorting of an array in 8086 assembly language
PPT
Bubble sort
PPTX
Advanced Sorting Algorithms
Merge sort
Merge sorting v2
simple-sorting algorithms
Sorting
Bin Sorting And Bubble Sort By Luisito G. Trinidad
Merge sort algorithm
Sorting bubble-sort anim
Marge Sort
Sorting Algorithm
Bubble sort
Sorting algorithms
Sorting techniques Anil Dutt
Sorting (Bubble,Merge,Selection sort)
Bubble sort
3.1 bubble sort
Sorting
bubble sorting of an array in 8086 assembly language
Bubble sort
Advanced Sorting Algorithms
Ad

Similar to Merge Sort (20)

PPTX
Merge sort
PPTX
Merge sort
DOCX
Merge sort lab mannual
PPTX
Presentation-Merge Sort
PPTX
Merge sort algorithm power point presentation
PPTX
Merge and merge sorting
PPTX
Merge sort-algorithm for computer science engineering students
PPTX
DSA- Merge Sort-a sorting technique.pptx
PPTX
merg sort slide created by anas sanan.pptx
PPTX
Daa final
PPTX
2010990716_Tamanna Asija.pptx
PPTX
Data structure Merge Sort implementation
PPTX
Merge sort
PDF
advanced algo
PPTX
24671A08972ds.pptxxxxxxxxxkkkskjsjsjskskssjdhdjskw
PPT
Merge sort
PPTX
Lecture -16-merge sort (slides).pptx
PDF
Algorithms lecture 3
PPTX
Merge sort js
Merge sort
Merge sort
Merge sort lab mannual
Presentation-Merge Sort
Merge sort algorithm power point presentation
Merge and merge sorting
Merge sort-algorithm for computer science engineering students
DSA- Merge Sort-a sorting technique.pptx
merg sort slide created by anas sanan.pptx
Daa final
2010990716_Tamanna Asija.pptx
Data structure Merge Sort implementation
Merge sort
advanced algo
24671A08972ds.pptxxxxxxxxxkkkskjsjsjskskssjdhdjskw
Merge sort
Lecture -16-merge sort (slides).pptx
Algorithms lecture 3
Merge sort js
Ad

Recently uploaded (20)

PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Construction Project Organization Group 2.pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPT
introduction to datamining and warehousing
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Artificial Intelligence
PPTX
UNIT 4 Total Quality Management .pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Current and future trends in Computer Vision.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
web development for engineering and engineering
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Construction Project Organization Group 2.pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
introduction to datamining and warehousing
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Artificial Intelligence
UNIT 4 Total Quality Management .pptx
Mechanical Engineering MATERIALS Selection
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Foundation to blockchain - A guide to Blockchain Tech
CYBER-CRIMES AND SECURITY A guide to understanding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Current and future trends in Computer Vision.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
web development for engineering and engineering
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf

Merge Sort

  • 1. Merge Sort Merge sort is a sorting technique based on divide and conquer technique. With worst-case time complexity being Ο(n log n), it is one of the most respected algorithms. Merge sort first divides the array into equal halves and then combines them in a sorted manner. Mergesort is a algorithm that was invented by John von Neumann in 1945
  • 2. Algorithm Merge sort keeps on dividing the list into equal halves until it can no more be divided. By definition, if it is only one element in the list, it is sorted. Then merge sort combines smaller sorted lists keeping the new list sorted too. Step 1 − if it is only one element in the list it is already sorted, return. Step 2 − divide the list recursively into two halves until it can no more be divided. Step 3 − merge the smaller lists into new list in sorted order.