Two binary searches: leftmost and rightmost index of target.
Input
6 8 5 7 7 8 8 10
Output
3 4
6 6 5 7 7 8 8 10
-1 -1