lecture8 - CSCI-255 Advanced Data Structures Lecture 8 Why...

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

View Full Document Right Arrow Icon
CSCI-255 Advanced Data Structures Lecture 8
Background image of page 1

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

View Full DocumentRight Arrow Icon
Why Emphasize Growth Rates? b The algorithm with the lower growth rate will be faster for all but a finite number of cases b Performance is most important for larger problem size b As memory prices continue to fall, bigger problem sizes become feasible b Improving growth rate often requires new techniques
Background image of page 2
Time Analysis b Since the time it takes to execute an algorithm usually depends on the size of the input, we express the algorithm's time complexity as a function of the size of the input b But sometimes, inputs of the same size may cause an algorithm to run at very different speeds s Consider a linear search on an array that does not contain the target as opposed to an array where the target is the first element
Background image of page 3

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

View Full DocumentRight Arrow Icon
Time Analysis (cont’d) b Best case analysis s Given the algorithm and input of size n that makes it run fastest (compared to all other possible inputs of size n ), what is the running time? b
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

lecture8 - CSCI-255 Advanced Data Structures Lecture 8 Why...

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

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