WHEN I did the same thing then my output is not coming

public class ConstructBST {

public static void main(String[] args) {
	// TODO Auto-generated method stub

}
public class Node{
	int data;
	Node left;
	Node right;
	
}
private Node root;

public void BST(int[] arr) {
	root = construct(arr, 0, arr.length -1);
	
	
	
}
private Node  construct(int[] arr, int lo, int hi) {

	int mid = (lo + hi)/2;
	Node nn = new Node();
	nn.data = arr[mid];
	
	nn.left = construct(arr, lo, mid -1);
	nn.right = construct(arr, mid+1,hi);
	
	return nn;
	
}

}

Hi Ayush
Can you please elaborate your Question so that i can assist you better.

Actually the code which is written by the teacher is not working their is some mistake

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.