public static int findMin(int[] a){
		if(a==null || a.length==0) throw new IllegalArgumentException();
		
		int min=a[0];
		int low=0,high=a.length-1;
		while(low<=high){
			int mid=(low+high)/2;
			if(a[mid]==min){
				for( int i=low;i<=high;i++){
					if(a[i]<min){
						min=a[i];
					}
				}
				break;
			}else if(a[mid]<min){
				min=a[mid];
				high=mid-1;
			}else{
				low=mid+1;
			}
		}
		return min;
	}