Algorithms and OOD (CSC 207 2014S) : EBoards

CSC207.01 2014S, Class 27: Merge Sort


Overview

Preliminaries

Upcoming work

Admin

Questions on the homework

Sorting Algorithms

Merge Sort

Break down the array:

7 3 2 8 1 5 6 4

7 3 2 8   1 5 6 4

7 3   2 8   1 5   6 4

Build it back up:

3 7   2 8   1 5   4 6

2 3 7 8   1 4 5 6

1 2 3 4 5 6 7 8

[Sam notes that recursion doesn't quite work this way. We do the left subarray completely before we do the right subarray.]

Skip Lists

Do the lab!

Copyright (c) 2013-14 Samuel A. Rebelsky.

Creative Commons License

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.