LeetCode 34. Find First and Last Position of Element in Sorted Array
2021-01-27 16:24:19
# leetcode
# core problems
Problem
LeetCode 34. Find First and Last Position of Element in Sorted Array
1. 题目简述
给出一个有序数组和一个target,找到其上下边界。例如:
Example:
Input: nums = [5,7,7,8,8,10], target = 8
Output: [3,4]
2. 算法思路
二分查找的模板题目,背背背!!!!
1 | class Solution { |