Big O Notation Flashcards

1
Q

What does Big O Notation Mean

A

The upper limit of the amount of time it takes to solve a particular problem

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

What is constant time complexity?

A

O(1), the amount of time it takes to solve a problem is unrelated to the amount inputted.

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

What is linear time complexity?

A

O(n), the amount of time taken to solve a problem is directly proportional to the amount inputted.

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

What is polynomial time complexity?

A

O(n^x), the amount of time it takes to solve a problem is directly proportional the amount inputted to the power of another number

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

What is logarithmic time complexity?

A

O(log(N)), the amount of time taken to solve a problem will increase at a smaller rate as the number of elements inputted.

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

What is polynomial time complexity?

A

O(2^X)
The amount of time taken to complete an algorithm will double with every turn.

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

Complexity for algorithms

A

Linear: O(n)
Binary: O(log(n))
Qucik sort: O(n^2)
Merge Sort: O(log(N)
Bubble and insertion: O(n^2)

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

Dijkastras Algorithm Tip

A

Find the shortest distance from the start that has not yet been visited

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

A* Algorithm Tip

A

Like Dijkastras Algorithm except add the heuristic

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