algorithms2 Flashcards
(6 cards)
What are the six types of algorithms classified by problem-solving approach?
Iterative, Recursive (direct/indirect), Divide-and-Conquer, Dynamic Programming, Randomised, and Brute-Force
What are the defining traits of a good algorithm step?
Unambiguous, effective, and terminates in finite time
What can the GCD problem teach us about algorithms?
That the same problem can be solved using multiple algorithms with different complexities and ideas.
Why don’t we use clock time to measure algorithm efficiency?
It’s influenced by hardware, language, compiler, and environmental factors — not a fair basis for comparison
What is the RAM Model of computation?
A theoretical machine where each basic operation (e.g., addition, assignment) takes one time unit — used for analysing algorithms objectively.
What is a basic operation in algorithm analysis?
The most time-consuming operation in the innermost loop — e.g., comparisons in sorting.