Big-O Notation

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

Flashcards on Big-O notation, covering growth rates, examples, and loop complexities.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

What is the purpose of Big-O notation?

To describe the growth rate of functions, usually establishing an upper boundary for the growth of a function T(n) for large n.

2
New cards

What is constant growth in Big-O notation?

O(1)

3
New cards

What is logarithmic growth in Big-O notation?

O(log n)

4
New cards

What is linear growth in Big-O notation?

O(n)

5
New cards

What is quadratic growth in Big-O notation?

O(n^2)

6
New cards

What is a polynomial growth in Big-O notation?

O(n^c) where c is a constant number

7
New cards

What is exponential growth in Big-O notation?

O(c^n) where c is a constant number

8
New cards

What is factorial growth in Big-O notation?

O(n!)

9
New cards

In Big-O notation, if T(n) is O(n^2), is it also O(n^3)?

Yes, because n^3 grows faster than n^2.

10
New cards

When determining Big-O complexity, what should you find?

The dominant term(s).

11
New cards

What is the time complexity of a single loop with O(1) instruction running constant times?

O(1)

12
New cards

What is the time complexity of a single loop incrementing/decrementing by constant c with O(1) instruction?

O(n)

13
New cards

What is the time complexity of a single loop dividing/multiplying by constant c with O(1) instruction?

O(log n)

14
New cards

What is the time complexity of nested loops?

Complexity of inner loop*complexity of outer loop