Data structures and algorithms notes

Reference: "Resolving data structures and algorithms used python"

O (f (n)) provides an approximation of the actual process of calculating the number of steps. The function f (n) is a simplified original function T (n) represents the dominant part.

T (n) = 5n² + 27n + 1005 when n increases, we can ignore the rest of the items, only concerned with 5n² to represent an approximation of T (n) of the. Similarly, the role of 5 factor will be increasingly
smaller, it can be ignored. We will say that the function T (n) of magnitude f (n) = n², i.e. O (n²)

 

Guess you like

Origin www.cnblogs.com/testzcy/p/11517563.html