What is Big O?

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/39

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:31 PM on 7/9/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

40 Terms

1
New cards
term image

O(n)

one loops runs n times

2
New cards
term image

O(log n)

Doubles each iteration

3
New cards
term image

O(n²)

two nested loops

4
New cards
term image

O(n)

two separate loops: n + n = 2n → O(n)

5
New cards
<p></p>

O(log n)

triples each iteration

6
New cards
term image

O(n log n)

outer loop is n, inner loop is log n

7
New cards
term image

O(n²)

total work is 1 + 2 +.. + n = n² / 2

8
New cards
term image

O(log n)

divides by 2 each iteration

9
New cards
term image

O(n³)

three nested loops

10
New cards
term image

O(n)

one recursive call per function call

11
New cards
term image

O(2^n)

two recursive calls per function call

12
New cards
term image

O(1)

always run 100 times (constant)

13
New cards
<p></p>

O(n)

O(log n) + O(n) = O(n)

14
New cards
term image

O(n² log n)

two nested linear loops and one logarithmic loop

15
New cards
term image

O(n)

worst case checks every possible divisor

16
New cards
term image

O(n log n)

log n outer iterations x n inner iterations

17
New cards
term image

O(n)

O(n) + O(log n) = O(n)

18
New cards
term image

O(n)

one recursive call each time

19
New cards
term image

O(n³)

O(n³) + O(log n) = O(n³)

20
New cards
term image

O(n log n)

log n iterations of a loop that does n work each time

21
New cards
term image

O(n)

the loop executes n times

22
New cards
term image

O(log n)

the value is multiplied by 5 each iteration

23
New cards
term image

O(n)

the inner loop runs a constant 50 times

24
New cards
term image

O(n)

the total work is O(n) + O(log n), and O(n) is larger

25
New cards
term image

O(n log n)

the outer loop runs log n times and the inner loop runs n times

26
New cards
<p></p>

O(n²)

the innermost loop is constant (100 iterations), so the work is n x n x 100 = O(n²)

27
New cards
term image

O(n)

the value increases by a constant amount each iteration

28
New cards
term image

O(n log n)

the outer loop is n and the inner loop is log3(n)

29
New cards
term image

O(n²)

the total work is 1 + 2 + … + n which is about n² / 2

30
New cards
term image

O(n)

each recursive call makes exactly one more recursive call

31
New cards
term image

O(2^n)

every recursive call creates two more recursive calls

32
New cards
term image

O(1)

the loop always run 100 times, regardless of n

33
New cards
term image

O(n)

the work is O(log n) + O(n), which simplifies to O(n)

34
New cards
term image

O(n² log n)

the loop runs n x n x log n times

35
New cards
term image

O(n)

in the worst case, the loop checks every value down to 1

36
New cards

checks each element one at a time from beginning until it finds the target value or reaches the end of the list

linear search O(n)

37
New cards

has to be sorted, then repeatedly checks the middle element of a sorted list and eliminates half of the remaining elements until the target is found or no element remains

binary O(log n)

38
New cards

repeatedly finds the smallest element in the unsorted portion of the list and swaps it with the first unsorted position

selection sort O(n²)

39
New cards

fibonacci sequence

O(2^k)

40
New cards

imporved fibonacci

O(n)