O-notation

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

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:02 PM on 4/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

12 Terms

1
New cards

Key operation

What is counted to estimate an algorithm’s running time. Most frequently executed instruction in an algorithm, or has the most impact on its running

2
New cards

What is the typical key operation for sorting and searching algorithms?

Item comparisons, ie calls to = or <=

3
New cards

Expression tightness

The expression 45n - 80 is both O(n) and O(n²) because it can be written as 0·n² + 45n - 80. O(n) is tighter than O(n²)

4
New cards

Name for O(n log n)

linearithmic

5
New cards

Name for O(n²)

quadratic

6
New cards

Name for O(2^n)

Exponential

7
New cards

How many comparisons does linear search do in the average and worst case?

O(n)

8
New cards

How many comparisons does insertion sort do in the average and worst case

O(n²) comparisons (quadratic time)

9
New cards

How many comparisons does insertion sort do in the best case?

O(n)

10
New cards

How many comparisons does quick sort do in the average and worst case?

O(n log n), O(n²) in the worst case

11
New cards

How many comparisons does merge sort do in the average and worst case

O(n log n)

12
New cards

How many comparisons does binary search do in the worst and average case

O(log n)