Find First and Last Position of Element in Sorted ArrayMediumAcceptance Rate 41.8%Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.ExamplesExample 1Inputnums = [5,7,7,8,8,10], target = 8Output[3,4]Constraints0 <= nums.length <= 10^5-10^9 <= nums[i] <= 10^9-10^9 <= target <= 10^9