public void sortArray() {

        this.arrayAccess = 0;
        this.comparisions = 0;

        int divisor = 10;
        int max = 1;
        boolean maxSet = false;

        while (max / (divisor / 10) > 0) {

            for (Integer temp : array) {

                if (!maxSet) {
                    if (temp > max)
                        max = temp;
                    this.comparisions++;
                    this.arrayAccess += 2;
                }

                queue[(temp % divisor) / (divisor / 10)].add(temp);

                this.arrayAccess++;

            }

            if (maxSet == false)
                maxSet = true;

            divisor *= 10;

            int j = 0;

            for (int i = 0; i < 10; i++) {

                while (!queue[i].isEmpty()) {

                    array[j] = queue[i].remove();
                    j++;

                }
            }
            this.arrayAccess += 10;
        }
    }