Given a sorted array, find the starting and ending position of a given target. Return [-1,-1] if not found.
nums = sorted array, target = integer
[firstPos, lastPos]
Example 1:
Input:
nums = [5,7,7,8,8,10] target = 8
Output:
[3,4]
Explanation:
8 appears at indices 3 and 4.