Find First and Last Position of Element in Sorted Array

Return the first and last positions of target in a sorted array.

Examples
Input: [[5,7,7,8,8,10],8]
Output: [3,4]
Hints

Find First and Last Position of Element in Sorted Array

Return the first and last positions of target in a sorted array.