Algorithms

Spring 2011
course
navigation

Feb 1

discuss homework

How far did you get?

more C

multiple files :
pointers :
char* name = "Jim Mahoney"; int* list1; // all three essentially same int *list2; // int list3[]; //
Note that none of those three actually creates space for an array; they all set up a place for a pointer to an integer. Which can be also be a pointer to the first of many integers, i.e. an array.
int x = 3; int* x_ptr = &x; *x_ptr = 7; // the value of x is now changed. int foo[3] = {10, 11, 12}; // curlies only during initialization foo[1] = 21; // modify middle entry *(foo +2) = 7; // same(!!) : "dereference 2 integers past foo"
I attached the play.c that we did in class.

work through my C code

Discuss mercurial, and code repositories briefly.

discuss quicksort, radix sort

quicksort:
radix sort:
Both of these are average O(n log(n)); both are good depending on situation. And both are "divide and conquer" algorithms.

fourier

Review: complex numbers, complex exponentials, vectors, dot products, and finding components.
Discuss continuous vs discrete representations of functions f(time) and F(freq). Start building some intuition for the big ideas.
(Probably on Thu) work out the fourier transfer relations.
http://cs.marlboro.edu/ courses/ spring2011/algorithms/ notes/ Feb_1
last modified Tuesday February 1 2011 3:26 pm EST

attachments [paper clip]

     name last modified size
[COD]play.c Feb 1 2011 3:26 pm 340B