上下界
Data Structures & Algorithms · 3 notes
- Binary Search Upper Boundhistorical
Implement binary search on an ascending array that may contain duplicate values. Return the position of the first value greater than or equal to the target.
- Find First and Last Position of Element in Sorted Arrayhistorical
Given an integer array nums sorted in ascending order and a target value target, find the starting and ending positions of the target value in the array.
- Find Smallest Letter Greater Than Targethistorical
Given a sorted list of characters letters containing only lowercase English letters, and a target letter target, find the smallest letter in this ordered list that is greater than the target letter.