240 likes | 389 Views
Complexity and Big-O Notation. Example N! = # ways to put N objects in linear order. Generating all such orderings (permutations) on N objects takes at least N! time. Example Adding two n-bit integers at most 2n bit operations. Time estimate for two methods. Time complexity.
E N D
Complexity and Big-O Notation Example N! = # ways to put N objects in linear order. Generating all such orderings (permutations) on N objects takes at least N! time. Example Adding two n-bit integers at most 2n bit operations.
Some common functions Decreasing order
Comparing a gcd computation with Fibonacci seq. 62=2.23+16 23=16+7 16=2.7+2 7=3.2+1 2=2.1+0 13=8+5 8=5+3 5=3+2 3=2+1 2=2.1+0