using System; using System.Collections; public static class utility { public static void swap< T >( T[] array,int i, int j) { T tmp=array[i]; array[i]=array[j]; array[j]=tmp; } public static void quicksort < T > ( T[] array, int l, int r) where T : IComparable< T > { int i=l; int j=r; T v=array[(int)((l+r)/2)]; for (;;) { while ( array[i].CompareTo(v) < 0 ) i=i+1; while ( v.CompareTo(array[j]) < 0 ) j=j-1; if (i<=j) { swap(array,i,j); i=i+1 ; j=j-1; } if (i>j) goto ended ; } ended: ; if (l