Time complexity:---my head is big, my foot hurts.
Common time complexities are: constant, number, linear, linear, square, cubic, polynomial, exponential, and factorial levels.
Here we mainly discuss the number of levels, linear level, square level, point of magnitude---why not discuss other? I can't do anything else,---.
Linear level:
F (x) Εo (n*n): This means that the growth rate of this function will not be n*n in the future. The x here refers to a specific input.
Use N to estimate the range size of X
Let's write a piece of code first. Qaq:
Def EXP1 (A, B): ans =1 while (b>0): ans *=a b-=1 return ans
This method is to find the value of the B-side of a? So how many times did b=10 do it, 3b+2 that's 32 times, then we can draw
F (x) Εo (3b+2) But 2 does not seem to change, when the value is larger 2 is not meaning so f (x) Εo (3b) Of course he is linear we all write wrong O (n)
To be continued ——————————————————————————————
Time Complexity---I think about the face of junior maths teacher again xxxxx