Fundamental Of Algorithms Flashcards
Define the term ‘algorithm’
An algorithm is a logical, step-by-step process for solving a problem.
Explain what is meant by decomposition
Decomposition involves breaking down a complex problem or system into smaller parts that are more manageable and easier to understand.
Explain what is meant by ‘abstraction’
Abstraction is the process of filtering out - essentially ignoring - the characteristics of problems that are not needed in order to concentrate on those that are needed. It is also the filtering out of specific details.
How to interpret pseudocode:
How to write pseudocode:
INPUT – indicates a user will be inputting something
OUTPUT – indicates that an output will appear on the screen
WHILE – a loop (iteration that has a condition at the beginning)
FOR – a counting loop (iteration)
REPEAT – UNTIL – a loop (iteration) that has a condition at the end
IF – THEN – ELSE – a decision (selection) in which a choice is made
any instructions that occur inside a selection or iteration are usually indented
How to identify inputs, processes and outputs within a given algorithm:
How to describe the purpose of a given algorithm:
Define the term ‘efficiency’ regarding algorithms
Efficiency looks at how much time it takes to run a particular algorithm and how much space is needed. By using both measurements, an algorithm that looks much more complex can actually be more efficient.
Compare different algorithms’ efficiencies