lecture 6 complex sorting 1. announcements homework 3 due monday no participation this week test is...

52
Lecture 6 Complex Sorting 1

Upload: maurice-lawrence

Post on 17-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Lecture 6

Complex Sorting 1

Page 2: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Announcements

• Homework 3 due Monday• No participation this week• Test is on Thursday• Part of Wednesday will be review• I will be posting some sample problems soon.

Page 3: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Mystery Sort

Page 4: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort: example

Page 5: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort

Page 6: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort: example

Page 7: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort: Pseudocode

Page 8: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort: Analysis

Page 9: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort

Page 10: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: example

Page 11: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: example

Page 12: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: example

Page 13: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: Pseudocode

Page 14: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: Analysis

Page 15: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: example

Page 16: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: example

Page 17: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: Pseudocode

Page 18: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: example

Page 19: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: example

Page 20: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: Analysis

Page 21: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 22: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 23: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 24: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 25: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 26: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Counting sort: example

Page 27: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Counting Sort: example

Page 28: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Lecture 6

Complex Sorting 1

Page 29: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Announcements

• Homework 3 due Monday• No participation this week• Test is on Thursday• Part of Wednesday will be review• I will be posting some sample problems soon.

Page 30: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Mystery Sort

Page 31: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort: example

Page 32: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort

Page 33: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort: example

Page 34: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort: Pseudocode

Page 35: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Shell Sort: Analysis

Page 36: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort

Page 37: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: example

Page 38: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: example

Page 39: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: example

Page 40: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: Pseudocode

Page 41: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Merge Sort: Analysis

Page 42: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: example

Page 43: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: example

Page 44: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: Pseudocode

Page 45: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: Analysis

Page 46: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 47: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 48: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 49: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 50: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Quicksort: average case

Page 51: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Counting sort: example

Page 52: Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will

Counting Sort: example