class IntSet3 { // Set class, sets stored as ordered partly-filled arrays private int[] array; private int count; final static int MAX=100; public IntSet3() { array = new int[MAX]; } public void delete(int n) { int i; for(i=0; in) { for(int j=count; j>i; j--) array[j]=array[j-1]; array[i]=n; count++; } } public boolean member(int n) { int from=0, to=count; int mid=(from+to)/2; while(from!=to&&array[mid]!=n) { if(array[mid]>n) to=mid; else from=mid+1; mid=(from+to)/2; } return from!=to; } public String toString() { int i; String str="{"; if(count>0) { str+=array[0]; for(i=1;i