Search in Rotated Sorted Array - Leetcode 33 - Binary Search (Python)

  Рет қаралды 8,149

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 11
@GregHogg
@GregHogg 6 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@christianjt7018
@christianjt7018 5 ай бұрын
this was a very tricky problem for me, but your explanation is incredibly clear, thanks!
@KurtSchwind
@KurtSchwind 11 ай бұрын
Isn't the 3rd case m,n-1 identical to edge case where m is position 0 ? 0,n-1 ? So why is 0,n-1 an edge case?
@Chathur732
@Chathur732 4 ай бұрын
first = 0 last = len(nums) - 1 while first
@saurabhbhagat4528
@saurabhbhagat4528 4 ай бұрын
To avoid all the extra conditions, you can also set left = min_index and right = min_index + nums.length, ofcourse while accessing those indices will be out of bounds of the array, so while accessing real item indices you can just do "nums[] mod nums.length" and when its time to update the left or right bounds, use the "fake" indices.
@mohammedyousufbaba3038
@mohammedyousufbaba3038 11 ай бұрын
Hi greg, I am your new subscriber from India. Love your content. I need a suggestion, Is DSA mandatory to learn if we want to get into data science field?
@GregHogg
@GregHogg 7 ай бұрын
Sorry for the extremely slow reply!! Yes, generally it is
@bishwut9209
@bishwut9209 Ай бұрын
this one got me fucked up
@bishwut9209
@bishwut9209 Ай бұрын
how would I come up with this one my own during interview ??
@npyeshaswi
@npyeshaswi 16 күн бұрын
@@bishwut9209 ikr i really wonder how everyone else learn this shit
@EchoesOfSurrealism
@EchoesOfSurrealism 11 ай бұрын
you should create a separate playlist for all your leetcode videos
First Bad Version - Leetcode 278 - Binary Search (Python)
8:12
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
Counter-Strike 2 - Новый кс. Cтарый я
13:10
Marmok
Рет қаралды 2,8 МЛН
Search in rotated sorted array - Leetcode 33 - Python
13:28
NeetCode
Рет қаралды 385 М.
LeetCode 33. Search in Rotated Sorted Array
9:30
Nick White
Рет қаралды 99 М.
Search in Rotated Sorted Array II - Leetcode 81 - Python
17:36
NeetCodeIO
Рет қаралды 19 М.
BS-4. Search Element in Rotated Sorted Array - I
16:38
take U forward
Рет қаралды 331 М.
Learn Python OOP in under 20 Minutes
18:32
Indently
Рет қаралды 180 М.
Every Sorting Algorithm Explained in 120 minutes (full series)
1:57:33
Kuvina Saydaki
Рет қаралды 83 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 691 М.
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН