Question: Write a recursive function that conducts a binary search with the following interface: bool BinarySearch(int info[ ], int x, int fromLoc, int toLoc, int &level)

![following interface: bool BinarySearch(int info[ ], int x, int fromLoc, int toLoc,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f57e6475bd1_70866f57e641e958.jpg)
![int &level) Input: infol]an integer array that contains a list of numbers](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f57e65024c0_70866f57e64a26b8.jpg)
Write a recursive function that conducts a binary search with the following interface: bool BinarySearch(int info[ ], int x, int fromLoc, int toLoc, int &level) Input: infol]an integer array that contains a list of numbers xthe search item the bounds of a list. level how many levels of recursion used in the execution. Output: True if x is in the list; false, otherwise
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
