@Override
    protected void sort(int[] a) {
        int largest = a[0];

        for (int n : a)
            if (largest < n)
                largest = n;

        int log = (int) Math.ceil(Math.log(largest) / Math.log(RADIX));

        for (int i = 0; i < log; i++) {
            for (int n : a)
                registers[getDigit(n, i)].offer(n);

            //printInfo(i);
            int index = 0;

            for (Queue register : registers) {
                while (!register.isEmpty()) {
                    set(index++, (Integer) register.poll());
                }
            }
        }
    }