Medium
Given a sorted array nums and a target, return [first, last] — the first and last index of target. Return [-1, -1] if it is not found. Must run in O(log n).
Input: nums = [5,7,7,8,8,10], target = 8 Output: [3,4]
Input: nums = [5,7,7,8,8,10], target = 6 Output: [-1,-1]