KOKO EATING BANANAS | PYTHON | LEETCODE # 875

Sdílet
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

Komentáře • 17

  • @dnm9931
    @dnm9931 Před 4 měsíci

    Thank you AGAIN !!!

  • @AaAaAaA-mm7cc
    @AaAaAaA-mm7cc Před 2 lety +1

    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!

    • @crackfaang
      @crackfaang  Před 2 lety +1

      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

  • @MinhNguyen-lz1pg
    @MinhNguyen-lz1pg Před rokem

    Your explaination of max(piles) is very intuitive, after understanding that, everything just click haha. Thanks a ton!

  • @subee128
    @subee128 Před 6 měsíci

    Thanks

  • @fahadm443
    @fahadm443 Před 2 lety +1

    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.

    • @crackfaang
      @crackfaang  Před 2 lety

      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

  • @slimysnail6071
    @slimysnail6071 Před rokem

    You are a legend who simplify pb this much:)

  • @peelyt3shorts113
    @peelyt3shorts113 Před rokem +2

    Bro you're so underrated , I love the way you're explaining the problem. I'm gonna recommend to my friends

    • @crackfaang
      @crackfaang  Před rokem

      Thanks and glad you enjoyed the video!

  • @lolboy94
    @lolboy94 Před 2 lety

    Your videos should have more views!

  • @pranavtripathi4181
    @pranavtripathi4181 Před rokem

    Amazing explanation 👏 Appreciate it.

  • @miyakakinshasa25
    @miyakakinshasa25 Před 10 měsíci

    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

  • @LastVoyage
    @LastVoyage Před 22 dny

    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?

  • @SriHarshaBolisetti
    @SriHarshaBolisetti Před rokem

    Keep up the great job :)

    • @crackfaang
      @crackfaang  Před rokem

      Thanks! Keep watching the videos 😉