Given a sorted array of integers and a target value, return the index of the target if it exists; otherwise return -1.
Example 1:
Input:
nums = [1,3,5,7] target = 3
Output:
1
All DSA practice problems · DSA mock interview · Mock interviews by company and role · Book a 1:1 interview