Given a list of numbers, the function will return the index of the number if it exists in the list. If it does not exist, the function will return -1.
The problem asks you to implement a binary search function that takes in a sorted array of integers and a target integer. The function should return the index of the target integer if it is found in the array, or -1 if it is not found.
This technical problem involves implementing a binary search algorithm to find a target value in a sorted array. If the target value is found, the index of the target value is returned. If the target value is not found, -1 is returned.
The problem is to find the index of a given target value in a sorted array. If the target is not present, the function should return -1.
The function should take a sorted array of integers and a target value as inputs, and return the index of the target value if it exists in the array, or -1 if it does not .
The binary search algorithm returns the index of the target value if it exists in the array, or -1 if it does not.
This problem deals with implementing a binary search algorithm to find a target value in a list of integers. If the target value is present in the list, the function should return its index; if not, the function should return -1.
This function will take a list of integers and a key as input, and will return the index of the key if it exists in the list, or -1 if it does not exist.