Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
20 Cards in this Set
- Front
- Back
Draw or visualize graph representing: O(n) |
Linear Time |
|
Draw or visualize graph representing: O(log(n)) |
logarithmic time |
|
Draw or visualize graph representing: O(n log(n)) |
linearithmic time |
|
Draw or visualize graph representing: O(n²) |
quadratic time (form of polynomial time) |
|
Draw or visualize graph representing: O(n³) |
cubic time (form of polynomial time) |
|
Which of the following has a faster growth rate? (worse performance) - log(n) - n |
n |
|
Which of the following has a faster growth rate? (worse performance) - n^3 - 3^n |
3^n |
|
Which of the following has a faster growth rate? (worse performance) - n log (n) - n² |
n² |
|
True or false 1 = O(1) |
True |
|
True or false 1 = O(n) |
True |
|
True or false n = O(n) |
True |
|
True or false n² = O(2) |
False |
|
Identify the dominant term and choose the most appropriate big-O function for the following: 5 + 0.0001n³ + 0.025n Choices: O(1), O(log(n), O(n), O(nlogn), O(n²), O(n³) |
Dominant term: 0.0001n³ O(n³) |
|
Identify the dominant term and choose the most appropriate big-O function for the following: 10000log(n) + 2n*log(n) Choices: O(1), O(log(n), O(n), O(nlogn), O(n²), O(n³) |
Dominant term: 2n*log(n) O(n*log(n) |
|
True or false? O(f + g) = O(f) + O(g) |
False O(f + g) = max {O(f), O(g)} |
|
True or false? O(f*g) = O(f) * O(g) |
True |
|
True or false? if g = O(f) and h = O(f) then g = O(h) |
False |
|
True or false? if g = O(f) and f = O(h) then g = O(h) |
True |
|
True or false? 5n + 8n² + 100n³ = O(n⁴) |
True! Since O(n³) = O(n⁴) 5n + 8n² + 100n³ = O(n⁴)
|
|
True or false? 5n + 8n² + 100n³ = O(n² ∗ log(n)) |
False 5n + 8n² + 100n³ = O(n³) |