YEAR 2 CO2 WEEK 5 ALGORITHM EFICIENCY Flashcards

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

How do you have to consider when deciding which algorithm is most suitable?

A

Space Efficiency.
Time Efficiency.
Big O Notation.

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

Explain what is meant by Space Efficiency?

A

A measure of how much memory (space) an algorithm takes as input (N) scales up.
Space taken up by code as N increases.
Taken up by data as N increases.

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

What is meant by Time Efficiency?

A

Measure of how much time it takes to complete an algorithm as input (N) increases.

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

How do programmers choose between time efficiency and space Efficiency?

A

They don’t! They have to decided in the situation.
If algorithm is time-critical then a fast algorithm is needed but there must be enough memory to handle it.
If there is a hardware limit to memory then a slower one needs to be used.

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

What is Big O?

A

It is used extensively to describe quality of algorithms.
There is a relationship between input N of algorithm and time or space takes to complete.

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