COMPSCI 61B Lecture Notes - Lecture 33: Quicksort, Big O Notation, Merge Sort

42 views5 pages

Document Summary

Saturday 4/15: guerilla section will be held 12-2 pm in 2nd oor labs, covers graphs and sorting. Start today if you haven"t started yet, not a project you can do last minute. Slides and videos are available to help speed you through getting started. Extra credit deadline is sunday, covers only rastering. Don"t have an insert operation when building your quadtree. Unlike a general quadtree, you know exactly what you"re getting in advance. Interestingly, insertion sort can be bounded by the number of inversions. Runtime is proportional to how much work needs to be done. On arrays with a small number of inversions, insertion sort is extremely fast. Runtime is theta(n + k), where k is the number of inversions. De ne an almost sorted array as one in which number of inversions <= cn for some c. For small arrays (n < 15 or so), insertion sort is fastest. More of an empirical fact than a theoretical one.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents