What is wrong in my code?

import java.util.*;

class deletenodesfromBST {

private class Node {
	int data;
	Node left;
	Node right;

}

private Node root;
public deletenodesfromBST(int[] arr) {
	for (int i=0;i<arr.length;i++) {
		this.root = construct(root, arr[i]);
		
	}
	
}

private Node construct(Node parent, int val) {
	
	if (parent==null) {
		Node nn=new Node();
		nn.data=val;
		return nn;
	}
	if (val<parent.data) {
		parent.left=construct(parent.left,val);
	}
	
	if (val>parent.data) {
		parent.right=construct(parent.right,val);
	}
	return parent;
	
	
}

public void preorder() {
	preorder(root);
}

private void preorder(Node node) {
	if (node == null) {
		return;
	}
	// N
	System.out.print(node.data+" ");

	// L
	preorder(node.left);

	// R
	preorder(node.right);
}
public void remove1(int item) {
	remove1(this.root, null, false, item);
}

private void remove1(Node node, Node parent, boolean ilc, int item) {

	if (node == null) {
		return;
	}

	if (item > node.data) {
		remove1(node.right, node, false, item);
	} else if (item < node.data) {
		remove1(node.left, node, true, item);
	} else {

		if (node.left == null && node.right == null) {
			if (ilc) {
				parent.left = null;
			} else {
				parent.right = null;
			}
		}

		else if (node.left == null && node.right != null) {
			if (ilc) {
				parent.left = node.right;
			} else {
				parent.right = node.right;
			}
		}

		else if (node.left != null && node.right == null) {
			if (ilc) {
				parent.left = node.left;
			} else {
				parent.right = node.left;
			}
		}

		else {

			int min = min(node.right);
			node.data = min;

			remove1(node.right, node, false, min);
		}
	}

}

private int min(Node node) {
	if(node.left==null) {
		return node.data;
	}
	return min(node.left);
	
}

}
public class Main {
public static void main(String[] args) {
Scanner scn=new Scanner(System.in);
int t=scn.nextInt();
for (int i=0;i<t;i++) {
int n=scn.nextInt();
int [] arr=new int[n];
for (int j=0;j<arr.length;j++) {
arr[j]=scn.nextInt();

    	}
    	deletenodesfromBST bst=new deletenodesfromBST(arr);
    	int nfd=scn.nextInt();
    	int [] delete=new int[nfd];
    	for (int i1=0;i1<delete.length;i1++) {
    		delete[i1]=scn.nextInt();
    		bst.remove1(delete[i1]);
    	}
    	bst.preorder();
    	
    	
    	
    }
	

	

}

}

it just wants that you insert the nodes in order they are coming according to whether they should be placed in left or right subtree based on data value.

I have attached the code for node insertion in the tree that should be followed. Please refer to it:

i have done the same work

my code is similar to yours .I have done deletion of nodes from BST

PLZ tell mistake in my code

your remove1 function is not right .also you’ve made the solution very complex
you can refer to this clean complete code