Find first position of target element in sorted array
Problem Given a sorted array and an element, find the first occurrence of key in array. As array can contain duplicate values, there can be multiple occurrences of same element, problem is to find first index. Examples Example 1: Input: a = [1, 4, 4, 10, 10, 15, 20], target = 10 Output: 3 ...