Find First and Last Position of Element in Sorted Array
You are given a sorted array of integers and a target element x. Your task is to find the first and last occurrences of x within the array. If the target element is not present in the array, return [-1, -1] to indicate that the element is not found. constraint: Output: Example 1: Input: nums = [5,7,7,8,8,10], target ...