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
2
Q
What is O(log n)?
A
Logarithmic
Halves the data set in each pass, opposite to exponential
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
4
Q
What is O(2n)?
A
Exponential
Runtime doubles with each increment, opposite to logarithmic
5
Q
What is O(n²)?
A
Polynomial
Runtime is bound by a polynomial function of the input size
6
Q
What is Time Complexity?
A
The amount of time it takes for an algorithm to run
7
Q
What is Space Complexity?
A
The amount of memory required by an algorithm to solve a problem