The problem is to find the index of a given target value in a sorted array of integers. If the target value is not found in the array, the function should return -1.
This solution is optimal because it is O(n) time complexity. However, it is not the most efficient solution. A more efficient solution would be to use a binary search, which would have a time complexity of O(log n).
Evaluated at: 2022-11-18 04:15:42