126k views
5 votes
True or False? O(1) is called constant time.

User Bbg
by
2.8k points

2 Answers

3 votes
Your mom cuz it’s your mom
User Roberto Bonini
by
3.6k points
0 votes

Answer:

True

Step-by-step explanation:

The notation O(n), pronounced big-O of n is an indication of the complexity of an algorithm. It is an indication of the relationship between the processing time and size of input

So O(n) means the time - input relationship is linear. If it takes x time units to process an input of size y then it will take 5x units to process an input of size 5y

O(1) means the time to process is independent of size. It is always constant. For example in computer algorithms, the time to access a value in an array of values is independent of the size of the array because arrays are indexed and access time for any element of the array is the same

O(n²) means that the time taken varies as the square of the input size

and so on

User Shirakia
by
3.0k points