code: public void countSortFromTo(int from, int to) {
  	if (size==0) return;
  	checkRangeFromTo(from, to, size);
  	
  	boolean[] theElements = elements;
  	int trues = 0;
  	for (int i=from; i<=to;) if (theElements[i++]) trues++;
  
  	int falses = to-from+1-trues;
  	if (falses>0) fillFromToWith(from,from+falses-1,false);
  	if (trues>0) fillFromToWith(from+falses,from+falses-1+trues,true);
  }
docs: Sorts the specified range of the receiver into ascending numerical order (<tt>false &lt; true</tt>).
  
  The sorting algorithm is a count sort. This algorithm offers guaranteed
  O(n) performance without auxiliary memory.
  
  @param from the index of the first element (inclusive) to be sorted.
  @param to the index of the last element (inclusive) to be sorted.