FastPrepFind Minimum in Rotated Sorted Array
Problems/Find Minimum in Rotated Sorted Array

Find Minimum in Rotated Sorted Array

Google logoGoogle● MediumINTERNONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The firsthand Software Engineer intern review names Find Minimum in Rotated Sorted Array and says it was the binary-search round. It does not say how to handle duplicates, the input limits, or the complexity needed. We rebuilt it using the usual version with distinct values. Our version is about 92% the same as the reported question.

You are given an array nums containing distinct integers. Before it is passed to your function, the array was sorted in strictly increasing order and then rotated at an unknown pivot. It may also have been rotated by its full length, leaving it in increasing order.

Return the minimum value in nums.

Your algorithm must run in O(log n) time.

Function

findMinimumInRotatedArray(nums: int[]) → int

Examples

Example 1

nums = [3,4,5,1,2]return = 1

The increasing array [1,2,3,4,5] was rotated, and its minimum value is 1.

Example 2

nums = [4,5,6,7,0,1,2]return = 0

The rotation point lies between 7 and 0, so the minimum is 0.

Example 3

nums = [11,13,15,17]return = 11

A full-length rotation leaves the array in increasing order, so its first value is the minimum.

Constraints

  • 1 <= nums.length <= 5000.
  • -5000 <= nums[i] <= 5000.
  • All values in nums are distinct.
  • nums is a rotation of a strictly increasing array.

More Google Onsite Interview questions

  • Route Pattern MatcherPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Evaluate a Nested Math ExpressionPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Distinct Subset SumsONSITE INTERVIEW · Seen Nov 2026
  • Playlist With No Same Artist in a RowONSITE INTERVIEW · Seen Nov 2026
  • Delete Nodes and Return Forest RootsONSITE INTERVIEW · Seen Nov 2026
  • Dice-Walk Winning ProbabilityPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • First and Last Target Position in a Mountain ArrayONSITE INTERVIEW · Seen Nov 2026
  • Lowest Common Ancestor in an N-ary TreePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • 0/1 Knapsack with Weight and Volume LimitsONSITE INTERVIEW · Seen Nov 2026
  • Batched Subsequence Word MatchesONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • Search in a Rotated Sorted ArrayAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Search a Row- and Column-Sorted MatrixByteDance · ONSITE INTERVIEWByteDance interview questions
  • 3Sum SmallerSalesforce · ONSITE INTERVIEWSalesforce interview questions
  • Smallest Batch Size Within a Step LimitMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Peak of an Increasing-Then-Decreasing ArraySnap Inc. · ONSITE INTERVIEWSnap Inc. interview questions
  • Online Meeting Scheduler with Fixed RoomsUber · ONSITE INTERVIEWUber interview questions
  • Search a 2D MatrixWhatNot · PHONE SCREEN · ONSITE INTERVIEWWhatNot interview questions
  • Search in Rotated Sorted ArrayKotak Mahindra Bank · ONSITE INTERVIEWKotak Mahindra Bank interview questions
  • Find First and Last Position in Sorted ArrayPaytm · ONSITE INTERVIEWPaytm interview questions
  • Detect a Silent SensorConfluent · ONSITE INTERVIEWConfluent interview questions

Interview reports that mention this question

  • Google SWE and PhD Intern Coding: 14 Experiences (Part 3 of 3)

Google interview experiences

  • Google interviews · November 2026
  • Google Software Engineer Onsite Questions: 10 Experiences
  • Google OA: What It Tests (2026)
  • Google L4 SWE Phone Screen: 1 Experience
  • Google ML Engineering Manager Onsite: 1 Experience
All Google interview questionsSee Google hiring insights
Saved
class Solution {
    public int findMinimumInRotatedArray(int[] nums) {
        // Write your code here.
    }
}
Checking account…