Algorithms – Fundamentals
This post is a term explanation for algorithm fundamentals – including IHK key points, examples, and exam questions.
In a Nutshell
An algorithm is a clear, finite set of instructions that leads step by step from an initial state to a target state.
Properties (MUST-HAVE)
- Uniqueness / Determinacy
- Executability / Effectiveness
- Finiteness (Termination)
- Determinism (in the classical exam context)
- Generality (for a problem class)
Algorithmic Building Blocks (very exam-relevant)
Every algorithm can be reduced to three structures – basis for Nassi-Shneiderman diagrams:
Sequence
a = 5
b = 10
summe = a + b
Selection
IF age >= 18 THEN
canVote = true
ELSE
canVote = false
Iteration
WHILE counter < 10
print("Hello")
counter = counter + 1
Description Methods
- Flowchart
- Nassi-Shneiderman diagram (very IHK-relevant)
- Pseudocode
- Program code
Examples You Should Know
- Sorting: BubbleSort, QuickSort
- Searching: linear search, binary search (only on sorted data)
Typical Exam Questions (with Short Answer)
- What are the three basic building blocks of every algorithm? Sequence, selection, iteration.
- Why must an algorithm be finite? It must terminate – infinite loops are not a valid solution.
- When can binary search be applied? Only with sorted data.
Tip for the IHK
Practice Nassi-Shneiderman diagrams for:
- largest number in list
- even/odd
- sum 1..n
- BubbleSort for a small list