CSCB63H3 Lecture Notes - Lecture 1: Upper And Lower Bounds
Document Summary
Some data structures (cid:8869) array (cid:8869) linked list (cid:8869) bst (cid:8869)hashmap. How long things take: preformed on the objects. How many steps (cid:8869)worst case: total is insertion sort (type i) 11n2 +14n-18 (cid:8869)bestcase: given as i (line 1)=2 (line 2, =5th-1) +5=5n (line 3,4,8,9) = (5+5 +4 +3)n - 1 (line 5]=10(n-1) = 11n2 +7n +2 (cid:8869) best case the machines on power on implementation b the machine itruns on. Both are are notimportanti can vary based quadratic polynomials, (cid:8869) so as no as constants are less significant b the highest degree is ofmostsignificance (cid:8869) we can show that: Iin2 21n+ 19 - 11n2 +19: iin2 +n = in+ n2 =12n2. S:setof functions fin = r is to be the setof functions forsuchthat letyet. I cer", jn. en, ynen, n n. f(n) = c(n) T(n) -0 (n3) n3 - n2 +5 =n + 5