public class BinarySearch { public static void main(String [] args){ int [] a = {1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10}; System.out.println(binarySearch(a, 11)); } public static int binarySearch(int [] a, in
public class BubbleSort { public static void main(String [] args){ int [] a = {1,52,3,21,541,122,321}; for(int i = a.length - 1; i >= 0; i--){ for(int j = i ; j >= 1 ; j--){ if(a[j] < a[j -
public class QuickSort{ public void quickSort(String[] strData, int left, int right){ String middle, temp; int i, j; i = left; j = right; middle = strData[(i+j)/2]; do{ while(strData[i].compareTo(midd
1 。安装libevent, memcached, Cache::Memcached如果说出现“error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory”, 那么执行sudo ln -s /usr/local/lib/libev