Master Data Structures & Algorithms For FREE at AlgoMap.io!
@ParthPatel-xb2cn15 күн бұрын
def koko(eating_capacity): if eating_capacity 1000: return "Koko has transcended to MONSTER status" else: return "Koko is... in a mysterious state”
@servantofthelord81473 ай бұрын
I’ve said it before and I’ll say it again - you are such a gifted teacher!
@GregHogg3 ай бұрын
Thank you so much!!
@Johnson_AmahАй бұрын
Hey Greg. I found that l
@zhihangcheng10833 ай бұрын
Hello, I’ve recently started learning binary search and have encountered several challenges. I often struggle with deciding whether to use while l
@younis5334 ай бұрын
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
@zhihangcheng10833 ай бұрын
Great video! But I believe that the slowest speed could be optimized to math.ceil(sum(piles) / h), not 1
@christianjt70183 ай бұрын
Amazing solution! thanks for sharing
@SeanKearney-g7dАй бұрын
god dam you killed this Greg
@SeanKearney-g7dАй бұрын
well done
@FaberLSH4 ай бұрын
Thank you so much!
@xiranli32395 ай бұрын
You are amazing❤
@GregHogg4 ай бұрын
Thank you!
@mumuuheibjfАй бұрын
while solving this problem I am craving bananas 🤣
@lakshyamathur88088 ай бұрын
what does the function k_works return?? what is meant by if k_works(k) ??
@GregHogg5 ай бұрын
True if k works, false otherwise
@moonlight-td8ed3 ай бұрын
it return True if monkey can eat k number of bananas in a pile in time
@DivineEdoka2 ай бұрын
My question is why is binary search working even when the arrray is unsorted
@GregHogg2 ай бұрын
We're not binary searching the array, we're searching the space for k