Big O Notation Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

O(1)

A

Constant Time
Check first position / no matter the size, the run time will always be the same.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

O(log n)

A

Logarithmic Time / Binary Search
Each comparison halves the list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

O(n)

A

Linear Time
For Loop / Run-time increases when items are added.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

O(n log n)

A

Quasilinear Time / Merge Sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

O(n^2)

A

Quadratic Time / Bubble Sort
In each pass through the list n items will be examined with at most n passes.
Nested Loops

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

O(2n)

A

Exponential Time
Growth doubles with each value added.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

O(n!)

A

Factorial Time
Grows in a factorial way based on the size of the input data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly