MwA: Complexities Flashcards

1
Q

What is the complexity of Dijkstra’s algorithm?

A

O(n²), where n is the number of nodes

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

What is the complexity of calculating the mean?

A

O(n)

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

What is the complexity of calculating the sum of triangle numbers?

A

O(n²)

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

What is the complexity of first-fit and first-fit decreasing algorithm?

A

O(n²), where n is the number of boxes

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

What is the complexity for quick sort?

A

O(n²), where n is the number of numbers in the list to be sorted and you are counting the number of comparisons to be made

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

What is the complexity of Kruskal’s and Prims algorithms?

A

O(n²), when n is the number of arcs

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