code: public void balance() {
          // System.out.print("Before root splitchar = "); System.out.println(sc[root]);
  
          int i = 0, n = length;
          String[] k = new String[n];
          char[] v = new char[n];
          Iterator iter = new Iterator();
          while (iter.hasMoreElements()) {
              v[i] = iter.getValue();
              k[i++] = (String)iter.nextElement();
          }
          init();
          insertBalanced(k, v, 0, n);
  
          // With uniform letter distribution sc[root] should be around 'm'
          // System.out.print("After root splitchar = "); System.out.println(sc[root]);
      }
docs: Balance the tree for best search performance