@@ -0,0 +1,575 @@
+// https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/%0Alass Solution %7B%0A    public int%5B%5D searchRange(int%5B%5D nums, int target) %7B%0A        int be = -1, end = -1;%0A        int idx = Arrays.binarySearch(nums, target);%0A        if (idx %3E= 0) %7B%0A            be = idx;%0A            while(be - 1 %3E= 0 && nums%5Bbe - 1%5D == target) %7B%0A                be--;%0A            %7D%0A            end = idx;%0A            while(end + 1 %3C nums.length && nums%5Bend + 1%5D == target) %7B%0A                end++;%0A            %7D  %0A        %7D%0A%0A        return new int%5B%5D%7Bbe, end%7D;%0A    %7D%0A%7D%0A

Create SearchRange.java