In a Google Photos mobile client, event timestamps may arrive unsorted after local batching. Given an integer array timestamps and an integer target, return the index of the first occurrence of target after sorting the array in non-decreasing order. If target does not exist, return -1.
timestamps is a list of integers. target is an integer.target in the sorted version of timestamps, or -1 if not found.Example 1
timestamps = [8, 3, 5, 3, 10], target = 30[3, 3, 5, 8, 10]. The first 3 is at index 0.Example 2
timestamps = [12, 7, 9, 1], target = 8-1[1, 7, 9, 12]. The value 8 is not present.1 <= len(timestamps) <= 10^5-10^9 <= timestamps[i] <= 10^9-10^9 <= target <= 10^9O(log n) after sorting.