SLR 26 Flashcards

Algorithms (only Big O flashcards) (7 cards)

1
Q

What is O(1)?

A

Constant

Always executes the in the same amount of time regardless of the size of the data set

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

What is O(log n)?

A

Logarithmic

Halves the data set in each pass, opposite to exponential

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

What is O(n)?

A

Linear

Performance declines as the data set grows, meaning efficiency decreases as the data set increases in size

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

What is O(n²)?

A

Polynomial

Performance is proportional to the square of the size of the data set. Has significantly reduced efficiency when dealing with large data sets

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

What is O(n^2)?

A

Quadratic

The algorithm’s execution time grows proportionally to the square of the input size

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

What is O(n!)?

A

Factorial

The algorithm’s execution time grows proportionally to the factorial of the input size

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

What is O(2n)?

A

Exponential

Runtime doubles with each increment, opposite to logarithmic

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