Chapter 3 Flashcards

1
Q

What is the average case?

A

It is the average between the worst runtime case and the best runtime case which are both dependent on the type of data given to the algorithm

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

What is Big-O Notation?

A

Also called Order of magnitude, it is the dominant factor of runtime, the factor that grows the most. It helps describe the worst possible case for algorithm performance as size of the data increases

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

What is Brute Force?

A

It is a way of solving a problem in which every possible combination or solution is exhausted and its not fully optimised for the problem. It will often have a bad runtime performance.

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

What is matching off?

A

A technique where items are marked or “checked off” as they are processed or found, often used in searching and matching algorithms. This prevents processing the same item multiple times.

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

What is exponential?

A

An exponential algorithm is one which has a runtime of O(2^n). It grows very quickly

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

What is linear?

A

A linear algorithm is one which has a runtime of O(n). It grows proportionally to the size of the data

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

What is log linear?

A

A log linear algorithm has a runtime of O(n log(n)). Its faster than quadratic but slower than linear

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

What is logarithmic?

A

A logarithmic algorithm has a runtime of O(log n). Its input size is cut in half at each stage of the iteration. The time increases logarithmically with input size.

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

What is order of magnitude?

A

In algorithm analysis, it describes how the resource requirements grow relative to input size, ignoring constant factors.

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

What is quadratic?

A

A quadratic algorithm has a runtime of O(n^2). There are often nested loops involved in the algorithm.

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

What is time complexity?

A

Time complexity is the measure of how long it will take for an algorithm to execute. The number of steps involved. It takes the algorithms input size as the argument.

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