Home/Blog/Exams & Theory

Selection Sort in Structograms Explained Step by Step

2026-11-226 min read

How Selection Sort Works

Selection Sort repeatedly finds the minimum element index in the unsorted suffix and swaps it into position i.

Live Example (DIN 66261)

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

selectionSort(arr)minIdx = iminIdx = jarr[j] < arr[minIdx]wahrfalschj = i + 1 bis laenge(arr) - 1tausche arr[i] und arr[minIdx]i = 0 bis laenge(arr) - 2

More Articles