solve(nums, target) — nums is sorted ascending and may contain duplicates. Return[first, last], the first and last index of target, or [-1, -1] when it is
absent. Run in O(log n) — a linear scan once you find one match is not enough.
Two lower bounds do the job: the first index with value >= target, and the first
index with value > target minus one.
Examples
solve([5,7,7,8,8,10], 8) → [3,4]
solve([5,7,7,8,8,10], 6) → [-1,-1]
solve([], 0) → [-1,-1]
solve([2,2,2,2], 2) → [0,3]Sample tests