Leetcode 153 - Find Minimum in Rotated Sorted Array

preview_player
Показать описание
Leetcode 153 - Find Minimum in Rotated Sorted Array
Рекомендации по теме
Комментарии
Автор

Prepare for coding interviews for FREE at AlgoMap.io!

GregHogg
Автор

The question must have a requirement to use log n complexity cause otherwise we could just use a loop to find out the minimum.

RTU-mwft
Автор

I would just use the min function. I know thats not whats intended but its the simplest solution

jonahw
Автор

Why not something like list[list.length ~/ 2] ?

yishayhazan
Автор

Why not check whether the difference is length - 1, then take the right value if it is?

iamtheonlyjohn
Автор

this question has only one logic .
I have solved it

Checkmete
Автор

Kinda understood it but i havent learned python yet only java and javascript

shog
Автор

Dude. I got an idea ...To return the minimum in a sorted rotated array why should not we return the next value of the pivot? Because the pivot is the place where the array is rotated and after the pivot the minimum element will be present always in case of Rotated sorted array...🤔

AkashDas-zeco