Paint House - Dynamic Programming - Leetcode 256 - Python

Поделиться
HTML-код
  • Опубликовано: 30 ноя 2024

Комментарии • 33

  • @NeetCode
    @NeetCode  3 года назад +1

    💡 DP PLAYLIST: ruclips.net/video/73r3KWiEvyk/видео.html

  • @sunnilabeouf
    @sunnilabeouf 3 года назад +32

    Hey man, just wanted to say thank you for putting the time in to make these videos! They've been super helpful and I was able to secure a google offer as a result :)

    • @NeetCode
      @NeetCode  3 года назад +3

      Congrats, You deserve it! I'm happy the videos were helpful.

    • @joy79419
      @joy79419 3 года назад

      Congrats man!

  • @JC-hj3sn
    @JC-hj3sn 3 года назад +7

    Probably the best explanation out of LeetCode discussions and RUclips Videos combined.
    I love these visuals. Keep it up!

  • @JaskeeratBrar
    @JaskeeratBrar 3 месяца назад

    Thanks a lot for your channel. I've always hated doing leetcode but knowing that your solution videos exist makes life a lot easier.

  • @shelllu6888
    @shelllu6888 3 года назад +1

    Love the part that you said "what does the cache tell us? why do we have it"
    Really inspiring and engaging video! Thank you!!

  • @SreeOne
    @SreeOne 2 года назад

    Best Explanation I have ever come across. Subscribed.

  • @vahidsaber2582
    @vahidsaber2582 2 года назад +2

    Hey dude. you explain things nicely. Let's do leetcode 2158 too if possible. Thanks

  • @claudiasun4758
    @claudiasun4758 3 года назад

    It really makes me wordless. Very amazing, can't speak more

  • @lianchen5727
    @lianchen5727 3 года назад

    Good explanation and elegant solution

  • @mehulsolanki9435
    @mehulsolanki9435 2 года назад

    Brilliant as always!

  • @naaleksandrova
    @naaleksandrova 2 года назад

    Would you consider this problem under 0/1 knapsack pattern?

  • @HarshaVardhan-pj5gp
    @HarshaVardhan-pj5gp 15 дней назад

    You are a genius😭

  • @iamnoob7593
    @iamnoob7593 3 месяца назад

    Thanks neetcode

  • @TheProximator
    @TheProximator 3 года назад

    Thanks my friend, your videos are just amazing :)

  • @anupamdey4893
    @anupamdey4893 10 месяцев назад

    @neetcode, shouldn't the brute force time complexity be 3^n ? It's 3 choices, n times.

    • @dheepthaaanand3214
      @dheepthaaanand3214 12 дней назад

      No, it's 3 choices only for the first house. For the rest of the houses it's 2 choices to avoid the adjacent house

  • @markomekjavic
    @markomekjavic 2 года назад

    Hey man, first of all, thank you very much for making these! I just wanted to ask why is this algorithm correct? I can't wrap my brain around it

  • @programmertik2046
    @programmertik2046 3 года назад

    Hey buddy i watch all your videos can you clear .whether all dp problems can be memorized or not ??

  • @nishu6971
    @nishu6971 3 года назад

    What if the number of color also varies ? can we solve it in similar way ?

  • @rajastylez
    @rajastylez 3 года назад

    Dude you da man!

  • @WorkingManVlog
    @WorkingManVlog 3 года назад

    Awesome explanation. Even a dumb head like myself could understand

  • @staazbeats
    @staazbeats 2 года назад

    thanks

  • @hhcdghjjgsdrt235
    @hhcdghjjgsdrt235 2 года назад

    I solved this in codechef

  • @rogerop6721
    @rogerop6721 3 года назад

    please solve todays leetcode challenge. It is very tough . Please bro

  • @programmertik2046
    @programmertik2046 3 года назад +1

    Annyone has recursive solution for this???

  • @itoroukpong1107
    @itoroukpong1107 Год назад

    wow. just wow