code: public int bwt() {
          final int[] SA = this.SA;
          final byte[] T = this.T;
          final int n = this.n;
  
          final int[] bucketA = new int[BUCKET_A_SIZE];
          final int[] bucketB = new int[BUCKET_B_SIZE];
  
          if (n == 0) {
              return 0;
          }
          if (n == 1) {
              SA[0] = T[0];
              return 0;
          }
  
          int m = sortTypeBstar(bucketA, bucketB);
          if (0 < m) {
              return constructBWT(bucketA, bucketB);
          }
          return 0;
      }
docs: Performs a Burrows Wheeler Transform on the input array.
  @return the index of the first character of the input array within the output array