Complexity Theory – Linear Complexity and Secondary Complexity

I’m just not sure…

If you have a code that can execute any of the following complexity:

> O (n) sequence, for example: two O(n)
> O(n²)

The preferred version is the version that can be executed in linear time. Will there be a period of time O( There are too many sequences of n) and O(n²) would be more popular? In other words, the statement C x O(n)

I think there are two problems here; the first is what the symbol says, and the second is the actual program The actual measurement content

>Big O is limited to n ->; therefore, in terms of big O, infinity, O(n) As others have pointed out that real programs only deal with some limited input, so it is very possible to choose a small enough value for n such that c * n> 1. n ^ 2 i.e. c> n, but strictly Say, you don’t deal with big O anymore.

I’m just not sure…

If you have one, you can do any of the following complex Sexual code:

> Sequence of O(n), for example: two O(n)
> O(n²)

The preferred version can be used in linear The version executed in time. Will there be too many O(n) sequences and O(n²) will be more popular for a while? In other words, the statement C x O(n)

I think there are two problems here; the first is what the symbol says, and the second is what is actually measured in the actual program

< p>>Big O as the limit is n –>; Therefore, in terms of big O, infinity, O(n) As others have pointed out the true The program only processes some limited inputs, so it is very possible to choose a small enough value for n such that c * n> 1. n ^ 2 is c> n, but strictly speaking, you no longer deal with big O.

Leave a Comment

Your email address will not be published.