Files
grokking-algorithms/chapter_02
onyx-and-iris 4cd7bb7d18 reorganise directories
upd chapter_01/binary.py
2025-03-26 01:27:35 +00:00
..
2025-03-26 01:27:35 +00:00
2025-03-26 01:27:35 +00:00

Selection Sort

We have to perform N swaps a total of N times. This takes N^N steps, therefore:

This algorithm has time complexity O(N^2)

Technically (n 1, n - 2 ... 2, 1 ~= N/2) swaps are performed but in BigO the constants are dropped.