public int findLastOccurrence(int [] arrA, int x,int start, int end ){
		if(end>=start){
			int mid = (start+end)/2;
			if((mid==arrA.length-1||arrA[mid+1]>x) &&(arrA[mid]==x)){
				return mid;
			}else if(arrA[mid]>x){
				return findLastOccurrence(arrA, x, start, mid-1);
			}else{
				return findLastOccurrence(arrA, x, mid+1, end);
			}
		}else return -1;
	}