Big O Notation Flashcards

1
Q

O(1)

A

Constant time, independent of the input size, the algorithm doesn’t vary in efficiency as input size (n) grows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

O(n)

A

Linear time, dependent on the input size, the algorithm become less efficient as its input size (n) grows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

O(log n)

A

• Logarithmic time, depended on the input size, the algorithm complexity minimizes as its input size (n) grows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly