There are different types of time complexity: you use a large O notation, so all cases of this function will be at least complicated this time.
As you approach infinity, this may be basically the n ^ 2 temporary scenario of the worst case scenario. The complexity of time is not an exact art, but rather a rough estimate of what speed you can expect for this class of algorithm, and therefore you are trying to be too precise.
For example, the theoretical time complexity may well be n ^ 2, although theoretically it should be n * n-1 due to the fact that an unexpected overflow can be performed.
Liam murphy
source share