auxiliaryCountingSort = (array, mod) => {
  const length = array.length;
  const bucket = [];
  let i;

  for (i = 0; i < 10; i++) {
    bucket[i] = [];
  }

  for (i = 0; i < length; i++) {
    const digit =
      parseInt((array[i].key / Math.pow(10, mod)).toFixed(mod), 10) % 10;
    bucket[digit].push(array[i]);
  }

  let pointer = 0;

  for (i = 0; i < 10; i++) {
    const localLength = bucket[i].length;

    for (let j = 0; j < localLength; j++) {
      array[pointer++] = bucket[i][j];
    }
  }

  return array;
}
Auxiliary sorting method for RadixSort
Sorts an array of objects according to only one digit of
their 'key' property. The digit to be sorted is determined
by the 'mod' variable
Every object inside the array MUST have the 'key' property with
a integer value.

Execution Time: (2 * array.length + 10)
Asymptotic Complexity: O(array.length)

@param Array
@return Array