public static int findString(String[] array, int start, int end, String pattern)
	{
		if(start>end)
			return -1;
		int mid = start + (end-start)/2, m=mid;
		int result = -1;
		while(m>=0 && "".equals(array[m]))
			m--;
		if(m>=0)
		{
			int compareResult = array[m].compareTo(pattern);
			if(compareResult == 0)
				result = m;
			else if (compareResult<0)
				result = findString(array, mid+1, end, pattern);
			else
				result = findString(array, start, m-1, pattern);
		}
		else
		{
			result = findString(array, mid+1, end, pattern);
		}
		return result;
	}