Merge sorting v2

8
MERGE SORTING Shared by Bonita and Judith

description

Teaching resource: Computing: Merge Sort

Transcript of Merge sorting v2

Page 1: Merge sorting v2

MERGE SORTINGShared by Bonita and Judith

Page 2: Merge sorting v2

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

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

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 5: Merge sorting v2

EXAMPLE OF MERGE SORT IN SCRATCH

Page 6: Merge sorting v2

YOUR TURN!

CAN WE HAVE VOLUNTEER????

YOU ARE THE MERGE SORTER

THE REST OF YOU ARE THE NUMBERS

Page 7: Merge sorting v2

EXAMPLE OF MERGE SORT IN PYTHON

Page 8: Merge sorting v2

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?