text: public void balance() {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++] = iter.nextElement();}init();insertBalanced(k, v, 0, n);}