SLR 26 Flashcards
Algorithms (only Big O flashcards) (7 cards)
What is O(1)?
Constant
Always executes the in the same amount of time regardless of the size of the data set
What is O(log n)?
Logarithmic
Halves the data set in each pass, opposite to exponential
What is O(n)?
Linear
Performance declines as the data set grows, meaning efficiency decreases as the data set increases in size
What is O(n²)?
Polynomial
Performance is proportional to the square of the size of the data set. Has significantly reduced efficiency when dealing with large data sets
What is O(n^2)?
Quadratic
The algorithm’s execution time grows proportionally to the square of the input size
What is O(n!)?
Factorial
The algorithm’s execution time grows proportionally to the factorial of the input size
What is O(2n)?
Exponential
Runtime doubles with each increment, opposite to logarithmic