Koko Eating Bananas - Leetcode 875 - Binary Search (Python)

  Рет қаралды 5,238

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 21
@GregHogg
@GregHogg 4 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@ParthPatel-xb2cn
@ParthPatel-xb2cn 19 күн бұрын
def koko(eating_capacity): if eating_capacity 1000: return "Koko has transcended to MONSTER status" else: return "Koko is... in a mysterious state”
@servantofthelord8147
@servantofthelord8147 3 ай бұрын
I’ve said it before and I’ll say it again - you are such a gifted teacher!
@GregHogg
@GregHogg 3 ай бұрын
Thank you so much!!
@zhihangcheng1083
@zhihangcheng1083 3 ай бұрын
Hello, I’ve recently started learning binary search and have encountered several challenges. I often struggle with deciding whether to use while l
@Johnson_Amah
@Johnson_Amah 2 ай бұрын
Hey Greg. I found that l
@younis533
@younis533 4 ай бұрын
I would have liked and illustrated explanation to the tech you used at the end, also wouldnt checking if a k works then checking k-1 doesnt work then that k is my answer
@SeanKearney-g7d
@SeanKearney-g7d Ай бұрын
god dam you killed this Greg
@SeanKearney-g7d
@SeanKearney-g7d Ай бұрын
well done
@christianjt7018
@christianjt7018 3 ай бұрын
Amazing solution! thanks for sharing
@zhihangcheng1083
@zhihangcheng1083 3 ай бұрын
Great video! But I believe that the slowest speed could be optimized to math.ceil(sum(piles) / h), not 1
@FaberLSH
@FaberLSH 4 ай бұрын
Thank you so much!
@xiranli3239
@xiranli3239 5 ай бұрын
You are amazing❤
@GregHogg
@GregHogg 4 ай бұрын
Thank you!
@DivineEdoka
@DivineEdoka 2 ай бұрын
My question is why is binary search working even when the arrray is unsorted
@GregHogg
@GregHogg 2 ай бұрын
We're not binary searching the array, we're searching the space for k
@mumuuheibjf
@mumuuheibjf Ай бұрын
while solving this problem I am craving bananas 🤣
@lakshyamathur8808
@lakshyamathur8808 8 ай бұрын
what does the function k_works return?? what is meant by if k_works(k) ??
@GregHogg
@GregHogg 5 ай бұрын
True if k works, false otherwise
@moonlight-td8ed
@moonlight-td8ed 3 ай бұрын
it return True if monkey can eat k number of bananas in a pile in time
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 6 МЛН
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
The IMPOSSIBLE Puzzle..
00:55
Stokes Twins
Рет қаралды 183 МЛН
Coin Change - Leetcode 322 - Dynamic Programming (Python)
15:27
Koko Eating Bananas - Binary Search - Leetcode 875 - Python
15:12
Diameter of Binary Tree - Leetcode 543 - Trees (Python)
11:16
BS-12. Koko Eating Bananas
21:04
take U forward
Рет қаралды 187 М.
Word Search - Leetcode 79 - Recursive Backtracking (Python)
12:24
KOKO EATING BANANAS | PYTHON | LEETCODE # 875
22:46
Cracking FAANG
Рет қаралды 2 М.
Machine Learning for Everybody - Full Course
3:53:53
freeCodeCamp.org
Рет қаралды 8 МЛН
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 6 МЛН