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(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
5
Q

What is O(n²)?

A

Polynomial

Runtime is bound by a polynomial function of the input size

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

What is Time Complexity?

A

The amount of time it takes for an algorithm to run

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

What is Space Complexity?

A

The amount of memory required by an algorithm to solve a problem

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