private int findMinIndex( )
 {
     int i;
     int minIndex;

     for( i = 0; theTrees[ i ] == null; i++ )
         ;

     for( minIndex = i; i < theTrees.length; i++ )
         if( theTrees[ i ] != null &&
             theTrees[ i ].element.compareTo( theTrees[ minIndex ].element ) < 0 )
             minIndex = i;

     return minIndex;
 }