1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. Search in Rotated Sorted Arrayhistorical

    Given a rotated sorted array whose rotation count is unknown in advance (for example, 0 1 2 4 5 6 7 may become 4 5 6 7 0 1 2). Search for the given target value in the array.

  6. Search in Rotated Sorted Arrayhistorical

    Given a rotated sorted array whose rotation count is unknown in advance (for example, 0 1 2 4 5 6 7 may become 4 5 6 7 0 1 2). Search for the given target value in the array.

  7. Find Peak Elementhistorical

    A peak element is strictly greater than its neighbors. Find a peak in the given array and return its index.

  8. Binary Searchhistorical

    Given an n-element sorted (ascending) integer array nums and a target value target, write a function to search for target in nums. If the target exists, return its index; otherwise return -1.

  9. Find Minimum in Rotated Sorted Arrayhistorical

    Given a rotated ascending array, find its minimum element.

  10. Square Roothistorical

    Implement the function int sqrt(int x). Compute and return the square root of x, rounded down.

  11. 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.