def _radixPass(a, b, r, n, K):
    c = _array("i", [0] * (K + 1))
    for i in range(n):
        c[r[a[i]]] += 1
    sum = 0
    for i in range(K + 1):
        t = c[i]
        c[i] = sum
        sum += t
    for a_i in a[:n]:
        b[c[r[a_i]]] = a_i
        c[r[a_i]] += 1