Question: Please answer this question in Java, and use comments to explain. Thank you! 1. (5 points) Implement the Binary Search algorithm in a recursive fashion.

Please answer this question in Java, and use comments to explain. Thank you!
1. (5 points) Implement the Binary Search algorithm in a recursive fashion. In other words, given a sorted integer array in non-increasing order and a key to search for, implement the BinarySearch (int[] arr, int left, int right) method. If the key is in the array, return its index in the array (for multiple appearances, return any one of them). Otherwise, return 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
