Merge sorting v2
description
Transcript of Merge sorting v2
![Page 1: Merge sorting v2](https://reader035.fdocuments.net/reader035/viewer/2022081907/546263ffaf7959fe1b8b67ab/html5/thumbnails/1.jpg)
MERGE SORTINGShared by Bonita and Judith
![Page 2: Merge sorting v2](https://reader035.fdocuments.net/reader035/viewer/2022081907/546263ffaf7959fe1b8b67ab/html5/thumbnails/2.jpg)
AUDIBILIZATION
Watch the video which shows how the Merge Sorting method works and take notes on the Work Sheet provided
![Page 3: Merge sorting v2](https://reader035.fdocuments.net/reader035/viewer/2022081907/546263ffaf7959fe1b8b67ab/html5/thumbnails/3.jpg)
RULES OF MERGE SORTING
List the array of numbers
Continually split the list in half
Don’t worry if you have an odd list of numbers
Split the list from the middle, then split down into individual lists such as 2, 4, 8
Repeated merge pairs of list previously created
![Page 4: Merge sorting v2](https://reader035.fdocuments.net/reader035/viewer/2022081907/546263ffaf7959fe1b8b67ab/html5/thumbnails/4.jpg)
RULES OF MERGE SORTING
Put the numbers in pairs, adjacent to each other with the lowest number first
Each list is sorted in 2, then merge the list again to create 2 lists with the numbers sorted
The merge the numbered list to create one large sorted list
![Page 6: Merge sorting v2](https://reader035.fdocuments.net/reader035/viewer/2022081907/546263ffaf7959fe1b8b67ab/html5/thumbnails/6.jpg)
YOUR TURN!
CAN WE HAVE VOLUNTEER????
YOU ARE THE MERGE SORTER
THE REST OF YOU ARE THE NUMBERS
![Page 7: Merge sorting v2](https://reader035.fdocuments.net/reader035/viewer/2022081907/546263ffaf7959fe1b8b67ab/html5/thumbnails/7.jpg)
EXAMPLE OF MERGE SORT IN PYTHON
![Page 8: Merge sorting v2](https://reader035.fdocuments.net/reader035/viewer/2022081907/546263ffaf7959fe1b8b67ab/html5/thumbnails/8.jpg)
OVERVIEW
What is Merge Sorting?
What are rules for Merge Sorting?
How do you know when Merge Sorting is complete?
Are there any comparisons between the Scratch and Python programs?