title type duration creator
Merge Sort Lab
lab
1:30
Drew Mahrt (NYC)

Merge Sort Lab

Introduction

Note: This lab should be completed in small groups of 2-3.

This lab will help you gain more practice using merge sort.

Exercise

Similar to yesterday's bubble and insertion sort lab, this will be split up into two sections: practice and interview.

Practice

There are 6 arrays listed below. For each one, draw out the merge sort diagram, showing each step of splitting the array up, as well as merging everything back together.

[-5,20,3,2,22]

[4,-4,3,-3,1,0]

[-3,1,0,0,5,2]

[1,0,1,0,1,0,1,0]

[1,-5,77,28,15,91,-8,23,52,44,140,14,23,41]

[1,2,3,4,5,6,7,8,9,0]

Interview

One person will play the interviewee, and the others will play the interviewer(s). The interviewers will give the interviewee an array of numbers. The interviewee has 10 minutes to sort the numbers via Merge Sort. After 10 minutes, the team swaps. Repeat until everyone has gone.

Requirements

Take pictures of the diagram for each practice problem, and turn them all in with the pull request.

Deliverable

Pictures of each of the practice problems. Nothing to submit for the interview section.