Given sorted integer array nums and target, find its starting and ending position. Return [-1,-1] if not found. O(log n) required.
Input: Sorted integer array nums and integer target.
Output: [first_index, last_index] or [-1,-1].
Input: [5,7,7,8,8,10],8
Output: [3,4]
Explanation: 8 at indices 3 and 4.Input: [5,7,7,8,8,10],6
Output: [-1,-1]
Explanation: 6 not found.Input: [],3
Output: [-1,-1]
Explanation: Empty array.0<=nums.length<=10^5-10^9<=nums[i]<=10^9nums is sorted non-decreasing.