Given a sorted array of integers and a target value, find the starting and ending position of the target. Return [-1, -1] if the target is not found.
With nums = [5, 7, 7, 8, 8, 10] and target = 8, the answer is [3, 4]. The value 8 first appears at index 3 and last appears at index 4.
You must achieve runtime. How can binary search find boundaries instead of just existence?
Constraints: . Array is sorted in non-decreasing order.