Day1 - o Squareroot is a monotonic function so you can...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 241 Jeremy Buhler Bryan 509 935-6132 jbuhler@wustl.edu 5 homework - 20% 4.5 labs - 20% 3 exams - 60% Small groups of 3 Class 1 Goals o How to think about computation o Abstractions About organizing data to answer questions fast o Bag of tricks Air Traffic Control Problem o Given a set of 20 points on a plane, which two points are closest? Need to take notes on smartpen o o Let p = [0 … n-1] be an array of points o See CodeExample1
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: o Squareroot is a monotonic function so you can remove it to save time What do you want in an algorithm? o Correctness is good o Correctness should be provable o It should be fast (machine independent) o Problem size dependent Worst case complexity for given input size Statement counting 1. Figure out loop bounds in terms of the next highest level loop variable # of itnerations = high-low+1 2. Assign loop body # of interations computed in...
View Full Document

Ask a homework question - tutors are online