Find Minimum in Rotated Sorted Array - Leetcode 153 - Binary Search (Python)

preview_player
Показать описание


Please check my playlists for free DSA problem solutions:

Best Courses for Analytics:
---------------------------------------------------------------------------------------------------------

Best Courses for Programming:
---------------------------------------------------------------------------------------------------------

Best Courses for Machine Learning:
---------------------------------------------------------------------------------------------------------

Best Courses for Statistics:
---------------------------------------------------------------------------------------------------------

Best Courses for Big Data:
---------------------------------------------------------------------------------------------------------

More Courses:
---------------------------------------------------------------------------------------------------------

Full Disclosure:
Please note that I may earn a commission for purchases made at the above sites! I strongly believe in the material provided; I only recommend what I truly think is great. If you do choose to make purchases through these links; thank you for supporting the channel, it helps me make more free content like this!
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

another solution is : pushing the items into max-heap
then loop through the heap values -> pop the root as long as the heap has more than one value left, once the heap has one value left, its the min value return it and done
but its nLongn I guess

fadygamilmahrousmasoud
Автор

First of all thank you so much for the videos! I am a big fan.
Secondly, it's one of those questions that you need to memorize because I couldn't get it when I tried to do it by myself.

nav
Автор

this was so good i tried looking at other explanations but it felt like it went against my intuition for solving the problem this was perfect

justinpardo-mwwy
Автор

All sorted rotated arrays have one thing in common that is there will be atleast one sorted half for sure

This can be proved by taking 5 elements and all its possible rotations and then see how left, mid and right varies

Post that we will come to the above mentioned conclusion

Now using this technique one can easily solve any variant problem related to sorted rotated array

DeepakGupta-zzvf
Автор

That was a beautiful approach, so precise and simple. Excellent job sir. Thank you for sharing.

hinocenciopaulo
Автор

Hi there, in one of your videos you mentioned the order of types of ds we should follow and solve because they are prerequisite for others, why you don't do the same, for example start with 5 problem from the first one to ... 5 problem of last one(dyn programming was the last one, i remember), and in the end of solving each problem recommend 5 similar important problems for practice
It would be really helpful if you do that instead of just randomly solving problem, inform us about what you think about this idea
Thanks

skyaqa
Автор

Make a video for the find target when sorted arr is rotated problem too

anirbandas
Автор

Why is M = 6 when it's actually 7 in your example?

sharukhsm