public int [] SortAndSearch(int [] arrA, int [] arrB){
		//create an Aux array and copy all the elements of arrA
		// create another boolean array, visited[] of size arrA[]
		// Initialize visited[] = false
		// Sort the Aux array using Merge sort.
		// Navigate through the arrB, taking one element at a time, say x
		//  1. perform binary search of x on Aux array and find the first occurrence of x
		//  2. if x is found, copy it to arrA, make visited[] = true
		//  3. Do linear navigation on Aux array till you find x, copy all these to arrA and mark visited[] = true  
		// When arrB is over, copy rest of the elements from Aux to arrA.
		
		int oIndex = -1; 
		boolean [] visited = new boolean [arrA.length];
		for(int i=0;i<visited.length;i++){
			visited[i] = false;
		}
		int [] Aux = new int[arrA.length];
		for(int i=0;i<arrA.length;i++){
			Aux[i] = arrA[i];
		}
		System.out.println("Original Array : ");
		displayArray(arrA);
		System.out.println("\nDefined Array : ");
		displayArray(arrB);
		MergeSort m = new MergeSort(Aux);
		Aux = m.mergeSorting();
		for(int i=0;i<arrB.length;i++){
			int x = arrB[i];
			int index = findFirstOccurrence(Aux, x, 0, Aux.length-1);
			if(index>=0){
				arrA[++oIndex]=Aux[index];
				visited[index] = true;
				//oIndex++;
				while(Aux[++index]==x){
					arrA[++oIndex]=Aux[index];
					visited[index] = true;
				}
			}
		}
		for(int i=0;i<Aux.length;i++){
			if(visited[i]==false){
				arrA[++oIndex] = Aux[i];
			}
		}
		return arrA;
	}