LeetCode 33: Search in Rotated Sorted Array

Problem Requirement The input gives an integer array nums and an integer target. Every value in nums is distinct, and the array was strictly increasing before rotation. Before the method is called, it may be rotated at an unknown index k (0 <= k < nums.length) into: [nums[k], ..., nums[n-1], nums[0], ..., nums[k-1]] Return the index of target in the rotated array when it exists; otherwise return -1. The problem requires an algorithm with O(log n) runtime. ...

July 28, 2026 · 12 min · map[name:Jeanphilo]