KOKO EATING BANANAS | PYTHON | LEETCODE # 875
Vložit
- čas přidán 27. 02. 2022
- In this video we'll be solving Leetcode problem # 875: Koko Eating Bananas. This is another binary search question that you'll find on Leetcode that seems to use a similar pattern to other questions, those being "Capacity to Ship Packages within D Days" and "Cutting Ribbons".
That being said, this is definitely the easiest question of the bunch and is quite easy to code up once you realize that you want to use a binary search. Setting it up is quite intuitive as well, though may take you seeing the solution once to have it engrained into your mind as to why it works.
Cutting Ribbons Video: • CUTTING RIBBONS | PYTH...
Capacity to Ship Packages Video: • CAPACITY TO SHIP PACKA... - Věda a technologie
Thank you AGAIN !!!
Following your approach in your ships and cutting ribbons videos, this question felt so easy to solve, had a hard time making the code work, but it felt satisfying when it worked, I can't believe how well I advanced just by following your explanations! Honestly thanks for all these videos!
I'm really glad you're getting value out of these videos and you can see your Leetcode skills improving. Please do let me know if there's any other topics/problems you'd like me to make videos for
Your explaination of max(piles) is very intuitive, after understanding that, everything just click haha. Thanks a ton!
Thanks
This is freaking awesome. I never understood binary search this well.
Watched the other two videos similar to this as well.
One thing will be awesome for your channel is a series on binary search.
Thanks for the kind words! Yes I agree, I definitely need to do more binary search videos as well as a basic explanation of the general use algorithm
You are a legend who simplify pb this much:)
Bro you're so underrated , I love the way you're explaining the problem. I'm gonna recommend to my friends
Thanks and glad you enjoyed the video!
Your videos should have more views!
I know right, I agree! 😂
Amazing explanation 👏 Appreciate it.
could you give an example for case for when mid is the right answer hence making right = mid - 1 would make us miss the solution? I don't get why mid ==right. Thanks so much! Lovely video
If we init right to max(piles) wouldn't it make sense to init left to max(min(piles)//h, 1)? Am I missing something here?
Keep up the great job :)
Thanks! Keep watching the videos 😉