code: protected void insertBalanced(String[] k, char[] v, int offset, int n) {
          int m;
          if (n < 1) {
              return;
          }
          m = n >> 1;
  
          insert(k[m + offset], v[m + offset]);
          insertBalanced(k, v, offset, m);
  
          insertBalanced(k, v, offset + m + 1, n - m - 1);
      }
docs: Recursively insert the median first and then the median of the
  lower and upper halves, and so on in order to get a balanced
  tree. The array of keys is assumed to be sorted in ascending
  order.