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

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

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 21
@GregHogg
@GregHogg 4 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@ParthPatel-xb2cn
@ParthPatel-xb2cn 15 күн бұрын
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!!
@Johnson_Amah
@Johnson_Amah Ай бұрын
Hey Greg. I found that l
@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
@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
@zhihangcheng1083
@zhihangcheng1083 3 ай бұрын
Great video! But I believe that the slowest speed could be optimized to math.ceil(sum(piles) / h), not 1
@christianjt7018
@christianjt7018 3 ай бұрын
Amazing solution! thanks for sharing
@SeanKearney-g7d
@SeanKearney-g7d Ай бұрын
god dam you killed this Greg
@SeanKearney-g7d
@SeanKearney-g7d Ай бұрын
well done
@FaberLSH
@FaberLSH 4 ай бұрын
Thank you so much!
@xiranli3239
@xiranli3239 5 ай бұрын
You are amazing❤
@GregHogg
@GregHogg 4 ай бұрын
Thank you!
@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
@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
BS-12. Koko Eating Bananas
21:04
take U forward
Рет қаралды 186 М.
House Robber - Leetcode 198 - Dynamic Programming (Python)
13:15
Don't underestimate anyone
00:47
奇軒Tricking
Рет қаралды 15 МЛН
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 44 МЛН
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 210 МЛН
KOKO EATING BANANAS | PYTHON | LEETCODE # 875
22:46
Cracking FAANG
Рет қаралды 2 М.
Pacific Atlantic Water Flow - Leetcode 417 - Graphs (Python)
17:10
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 100 М.
Diameter of Binary Tree - Leetcode 543 - Trees (Python)
11:16
Koko Eating Bananas - Binary Search - Leetcode 875 - Python
15:12
Number of Islands - Leetcode 200 - Graphs (Python)
11:01
Greg Hogg
Рет қаралды 10 М.
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 245 М.