Home/Blog/Exams & Theory

Insertion Sort in Structograms: Step-by-Step Guide

2026-11-226 min read

The Playing-Card Analogy

Pick each element starting at index 1, shift larger sorted elements one slot to the right, and insert the key into the open position.

Live Example (DIN 66261)

Rendered directly in DIN 66261 — click to open and edit in the workspace.

insertionSort(arr)schluessel = arr[i]; j = i - 1arr[j + 1] = arr[j]j = j - 1j >= 0 UND arr[j] > schluesselarr[j + 1] = schluesseli = 1 bis laenge(arr) - 1

More Articles