code: private void computeBucketSize2_SaBucket(int leftPtr, int rightPtr, int offset, int q) {
          int suffix1 = suffixArray[leftPtr] + offset;
          int suffix2 = suffixArray[rightPtr] + offset;
          while (sufPtrMap[suffix1] == sufPtrMap[suffix2]) {
              suffix1 += q;
              suffix2 += q;
          }
          if (sufPtrMap[suffix1] > sufPtrMap[suffix2]) {
              int tmpSwap = suffixArray[leftPtr];
              suffixArray[leftPtr] = suffixArray[rightPtr];
              suffixArray[rightPtr] = tmpSwap;
          }
          sufPtrMap[suffixArray[leftPtr]] = leftPtr;
          sufPtrMap[suffixArray[rightPtr]] = rightPtr;
  
      }
docs: Completely sorts buckets of size 2.
  
  @param leftPtr  points to the leftmost suffix of the current bucket.
  @param rightPtr points to the rightmost suffix of the current bucket.
  @param offset   is the length of the common prefix of the suffixes rounded down to a
  multiple of q.
  @param q        is the initial prefix length used for the bucket sort. It also determines
  the increase of offset.