CSC108H1 Lecture Notes - Lecture 29: Weighted Arithmetic Mean

35 views3 pages
7 Apr 2016
School
Course
yifanyang and 39659 others unlocked
CSC108H1 Full Course Notes
21
CSC108H1 Full Course Notes
Verified Note
21 documents

Document Summary

Run-time of code is usually greater than operating on large input. Can be massive differences in run-time between different algorithms, even for the same problem. Knowing the shape of the run-time growth curve is valuable. Run the code and measure the run-time with different input sizes (cid:1) (cid:1) (cid:1) (cid:1) (cid:1) (cid:1) time linear log(n) Exponential - o(2^n) n(log n) more than n. less than n^2 constant time c" x n" repetitions nc 0(n) As i do something to n, the time will also behave the same way, linear. Constant number of loops doesn"t change by the length of the list. The distribution of the list, is a factor on the run-time. Input case that will take the most amount of time. Arrangement of the data that will take the longest run- time (cid:1) (cid:1) A weighted average. (time over the amount of average) (cid:1) (cid:1) (cid:1) Two chunks of code in sequence: add the time they take.

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