133
правки
Изменения
→Псевдокод
=== Псевдокод ===
<code>
'''SimpleCountingSort''' '''for ''' number = 0 '''to ''' k - 1 C[number] = 0; '''for ''' i = 0 '''to ''' length[A] - 1 C[A[i]] = C[A[i]] + 1;
pos = 0;
'''for ''' number = 0 '''to ''' k - 1 '''for ''' i = 0 '''to ''' C[j] - 1
A[pos] = number;
pos = pos + 1;