Skip to content
IRC-CodingIRC-Coding
algorithmsstruktogrampseudocodeiterationselectionsequencefundamentals

Algorithm Fundamentals: Properties & Building Blocks

Learn algorithm essentials: definition, key properties (uniqueness, finiteness), building blocks (sequence, selection, iteration), pseudocode and exam examples.

S

schutzgeist

1 min read
Algorithm Fundamentals: Properties & Building Blocks

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

  1. Unambiguity / Determinism
  2. Executability / Effectiveness
  3. Finiteness (Termination)
  4. Deterministic behavior (in the classical exam context)
  5. 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)

  1. What are the three fundamental building blocks of every algorithm? Sequence, selection, and iteration.
  2. Why must an algorithm be finite? It must terminate – infinite loops are not a valid solution.
  3. 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

Specialized Topics

Back to Blog
Share:

Nächster Artikel in Software Architecture

Weiterlesen
Algorithmic Complexity Attacks & Worst-Case Analysis

Related Posts