cs lecture tutorial dec 2

cs lecture tutorial dec 2 - cs lecture/tutorial dec 2 void...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
cs lecture/tutorial dec 2 void quicksort(int a[],int n) { typical case O(n logn) searching/sorting -big-O notation -linear search o(n) -binary search(sorted array), O(log n) -selection sort -bubble sort O(n^2) -insertion sort (worst case) -mergesort (needs temp array) O (nlog n) worst case -quicksort-typical is O(n logn) worst case (n^2) Summary -ch. 2-7 (fundamentals) -vars, types, expression -if, loops, printf, scanf(%d,&g) -int, char, double Section 8.1 -arrays, (no multi-dimensional arrays) chapter 9 -functions -recursion -quicksort skim chapter 10 -program organization (no global variables) midterm chapter 11 and 12 -pointers and arrays (no 12.4/12.5) chapter 13-strings chapter 15 –header files section 16.1/16.2 –structs (no enums/unions) sections 17.1 -> 17.4
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
-dynamic memory -pointers to functions (no linked lists) section 23.3 -math.h section 25.2 -unicode/UTF-8 Algorithms -Euclid (GCD) -Big-O/sorting/searching -bisection/fixed point iteration -page rank -etc Sorting in reality In memory -quicksort for larger n (n>10ish) qsort
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

cs lecture tutorial dec 2 - cs lecture/tutorial dec 2 void...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online