Since, this is a function problem. You don't need to take any input, as it is already accomplished by the driver code. You just need to complete the function find() that takes array arr, integer n and integer x as parameters and returns the required answer. Note: If the number x is not found in the array just return both index as -1.
Expected Time Complexity: O(logN) Expected Auxiliary Space: O(1).