Big Oh Flashcards

1
Q

O(log(n))

A

narrows down the search by repeatedly halving the dataset until you find the target value.

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

O(n)

A

performance becomes less efficient as data grows.

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

Example of 2^n algorithm

A

recursive fibonacci: level 1 = 2^1, level 2 = 2^2, level 3 - 2^3 … etc

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

Example of n! algorithm

A

recursive call of function with a for loop: when n = 3, level 1 = 3, level 2 = 2… or 3 * 2 * 1

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