Algorithms icon indicating copy to clipboard operation
Algorithms copied to clipboard

[SSOC'23] Find minimum in rotated sorted array

Open Nikita06211 opened this issue 2 years ago • 4 comments

Describe the solution you'd like Suppose an array of length n sorted in ascending order is rotated between 1 and n times. the algorithm will return the minimum element of this sorted rotated array of unique elements. The solution will be in c++.

Additional context Example: Input: nums = [3,4,5,1,2] Output: 1 Explanation: The original array was [1,2,3,4,5] rotated 3 times

kindly assign me this issue under SSOC'23.

Nikita06211 avatar Jun 11 '23 15:06 Nikita06211

@Kumar-laxmi please assign me this task under ssoc'23

TusharGagal avatar Jun 16 '23 15:06 TusharGagal

@Kumar-laxmi please this issue to me so that i start working on this under ssoc'23 program.

himughanakash avatar Jun 18 '23 05:06 himughanakash

I can solve this issue. It can be solved by two approaches. We can either sort the array so that the first element will be minimum. Or we can linearly travel in the array and when we find an element which is smaller than its previous element, then that is the minimum element in the rotated sorted array. Kindly assign me this issue so that I can work on this.

chhavisharma30 avatar Jul 20 '23 07:07 chhavisharma30

@kum

Describe the solution you'd like Suppose an array of length n sorted in ascending order is rotated between 1 and n times. the algorithm will return the minimum element of this sorted rotated array of unique elements. The solution will be in c++.

Additional context Example: Input: nums = [3,4,5,1,2] Output: 1 Explanation: The original array was [1,2,3,4,5] rotated 3 times

kindly assign me this issue under SSOC'23.

@Kumar-laxmi kindly assign me this issue.

shivangi2002 avatar Jul 25 '23 09:07 shivangi2002

Stale issue message

github-actions[bot] avatar May 21 '24 16:05 github-actions[bot]