function comparator(a, b) {
  if (a.length > b.length)
    return -1;
  if (a.length < b.length)
    return 1;

  if (a < b)
    return -1;
  if (a > b)
    return 1;

  return 0;
}
Function used to compare two keys in order to sort them first by decreasing
length and then alphabetically as per the "4.2 Effective Indexing Strategy"
point of the paper.

@param   {number} k - Levenshtein distance threshold.
@param   {number} s - Length of target strings.
@returns {number}   - The number of selected substrings.