Challenge problem

My code is this even after sorting it is still failing.

import java.util.*;

public class Main {

static Scanner scn = new Scanner(System.in);
public static void main(String args[]) {
	int[] arr;
	arr = take_input();
	arr = bubble_sort(arr);
	int ele = scn.nextInt();
	int index=binary_search(arr,ele);
	System.out.println(index);
}
public static int[] take_input() {
	//System.out.println("What size array do you want?");
	int n = scn.nextInt();
	int[] arr = new int[n];
	for (int i = 0; i < arr.length; i++) {
	//	System.out.println("Enter value:");
		arr[i] = scn.nextInt();
	}
	return arr;
}

public static int[] bubble_sort(int[] array) {
	int i = array.length-1, j, k;
	for (k = 0; k < i ; k++) {
		for (j = 0; j < i; j++) {
			if (array[j] > array[j + 1]) {
				swap(array, j, j + 1);
				//display(array);
			}
		}
	}
	return array;
}

public static void swap(int[] arr, int i, int j) {
	int tmp = arr[i];
	arr[i] = arr[j];
	arr[j] = tmp;
}
public static int binary_search(int[] arr,int num) {
	int index=-1,low=0,high=arr.length-1;
	int mid;
	//System.out.println(mid);
	while(low<=high) {
		mid=(low+high)/2;
		if(arr[mid]<num) {
			low=mid+1;
		}
		else if(arr[mid]>num) {
			high=mid-1;
		}
		else if(arr[mid]==num) {
			return mid;
		}
	}
	return index;
}

}

@VinayakSingh11111 bro sort krna hi ni hai usko, I have given you algorithm do you want code for referance?

yes need a code for refrence

@VinayakSingh11111 https://ide.codingblocks.com/s/271461
Hi bro you can refer this code, basically the idea is to find a pivot now you got two sorted arrays in it.
For example:- 4 5 1 2 3, so it here you have 4, 5 and 1, 2, 3 as sorted array now you have two search spaces namely:-
//There are two sorted arrays [0, pivot] and [pivot + 1, n)
Now you can check in which part you can apply binary search refer the code you will get it bro!

If you don’t have any other query mark it resolved and rate full else feel free to ask bro!