<prompt> Kutoa mti binary, angalia kama ni mti binary search. Andika kazi Java kufanya hivyo. Fikiria Node darasa ni kutekelezwa.  <response>: To check if a binary tree is a binary search tree BST, we need to ensure that all the nodes in the left subtree of a node are less than or equal to the current nodes value while all the nodes in the right subtree of a node are greater than the current nodes value. Below is a Java function that checks if a binary tree is a BST.public boolean isBSTNode root return isBSTroot, Integer.MIN_VALUE, Integer.MAX_VALUE;private boolean isBSTNode node, int min, int max if node null return true; if node.data min node.data max return false; return isBSTnode.left, min, node.data - 1 isBSTnode.right, node.data 1, max;The isBST function takes in the root node of the binary tree and calls the private isBST function with the minimum and maximum possible integer values as the initial parameters. The isBST function checks if the node is null, in which case it returns true. Otherwise, it checks if the nodes value is within the given range of min and max. If not, it returns false because the node violates the BST property. If the value is within the given range, it recursively checks the left and right subtrees with updated min and max values. If both subtrees return true, the function returns true. 