Search `target` in sorted ascending `nums`. Return index or `-1`. Variant **#2**.
Example 1
Input: nums = [2,4,6,8,10,12,14,16,18,20], target = 14
Output: 6
Constraints
Acceptance: 64% · Topics: binary-search, array
← All practice problems