Algorithms – Fundamentals
This guide covers the essentials of algorithms – including key exam points, practical examples, and typical test questions.
In a Nutshell
An algorithm is a clear, finite set of instructions that takes you step by step from an initial state to a desired outcome.
Essential Properties
- Unambiguity / Determinism
- Executability / Effectiveness
- Finiteness (Termination)
- Deterministic behavior (in the classical exam context)
- Generality (applicable to a class of problems)
Core Algorithmic Structures (High Exam Relevance)
Every algorithm boils down to three fundamental structures – the foundation for flowcharts (Nassi-Shneiderman diagrams):
Sequence
a = 5
b = 10
summe = a + b
Selection
WENN alter >= 18 DANN
darfWählen = true
SONST
darfWählen = false
Iteration
SOLANGE counter < 10
print("Hallo")
counter = counter + 1
Ways to Describe Algorithms
- Flowchart
- Flowchart diagram (highly relevant for exams)
- Pseudocode
- Source code
Examples You Should Know
- Sorting: BubbleSort, QuickSort
- Searching: linear search, binary search (only on sorted data)
Typical Exam Questions (Quick Answers)
- What are the three fundamental building blocks of every algorithm? Sequence, selection, and iteration.
- Why must an algorithm be finite? It must terminate – infinite loops are not a valid solution.
- When can you use binary search? Only when the data is already sorted.
Exam Prep Tip
Practice flowcharts for these problems:
- finding the largest number in a list
- checking odd/even
- calculating the sum from 1 to n
- BubbleSort on a small list
More Algorithm Articles
Algorithms are at the heart of computer science and software development. The following articles will help you understand all aspects of algorithms and apply them in practice.
Fundamentals and Properties
- Algorithm Fundamentals: Formulation and Application – Learn how to formulate algorithms and write pseudocode
- Algorithm Fundamentals: Complexity Analysis – Master Big-O notation and complexity analysis
- Algorithms and Data Structures 2026 – Current overview of important algorithms and data structures
Specialized Topics
- Algorithm Complexity and Security – Security considerations in algorithm design
- Algorithms: Searching, Sorting, and Recursion – Overview of key search and sort methods



