algorithms2 Flashcards

(6 cards)

1
Q

What are the six types of algorithms classified by problem-solving approach?

A

Iterative, Recursive (direct/indirect), Divide-and-Conquer, Dynamic Programming, Randomised, and Brute-Force

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

What are the defining traits of a good algorithm step?

A

Unambiguous, effective, and terminates in finite time

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

What can the GCD problem teach us about algorithms?

A

That the same problem can be solved using multiple algorithms with different complexities and ideas.

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

Why don’t we use clock time to measure algorithm efficiency?

A

It’s influenced by hardware, language, compiler, and environmental factors — not a fair basis for comparison

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

What is the RAM Model of computation?

A

A theoretical machine where each basic operation (e.g., addition, assignment) takes one time unit — used for analysing algorithms objectively.

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

What is a basic operation in algorithm analysis?

A

The most time-consuming operation in the innermost loop — e.g., comparisons in sorting.

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