3418. Maximum Amount of Money Robot Can Earn | DP on Grids | Top Down Approach

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ม.ค. 2025

ความคิดเห็น • 20

  • @kbcoder3734
    @kbcoder3734 2 วันที่ผ่านมา +2

    Superb solution, I spent more than 1 hour on this problem during the contest while using 2-d DP.

  • @shauryatomer1058
    @shauryatomer1058 2 วันที่ผ่านมา +1

    thanks for the great explanation, was able to come with complete solution, only thing left was didn't think separate base case would be required for i = m - 1 && j = n - 1.

  • @DarkDragon-bz6qp
    @DarkDragon-bz6qp 2 วันที่ผ่านมา +1

    Thanks Great explanation..For interviews if i explain till memoization will it be enough?or i need to use bottom up approach?

    • @25-cse-csmohitkumarmandal59
      @25-cse-csmohitkumarmandal59 2 วันที่ผ่านมา

      If you able to solve memorization, you will able to solve bottom up already (once watch Love Babbar 's DP series)
      (If q. Is easy-moderate)

    • @DarkDragon-bz6qp
      @DarkDragon-bz6qp 2 วันที่ผ่านมา

      ​@@25-cse-csmohitkumarmandal59okk

  • @whyyshivam
    @whyyshivam 2 วันที่ผ่านมา +1

    Another approach I thought of is : Calculate the total sum from (0,0) till (m−1,n−1), including negative values. During the traversal, track the two smallest (most negative) values. In the final answer, add the absolute values of these two smallest negatives to the total sum.
    Is this approach correct?

    • @kumkumslab5811
      @kumkumslab5811 8 ชั่วโมงที่ผ่านมา

      no because you can't track which path you have selected so might be possible that 2 min elements are not the part of that path

  • @aryavyadav9345
    @aryavyadav9345 2 วันที่ผ่านมา

    Was able to solve this question during the contest thankfully 😊

    • @NeelakshiSachdeva
      @NeelakshiSachdeva วันที่ผ่านมา

      Can I do dp without doing recursion?? Actually somebody told me to do recursion first as dp follows but even after spending 2 weeks I'm not getting recursion totally. Can u pls guide if dp can be done independently.or not?

  • @kodurisaivishnu4916
    @kodurisaivishnu4916 2 วันที่ผ่านมา +1

    i have got an idea to solve this problem but ,Failed to handle the Base case.
    Does AnyOne With same problem ?

    • @BruceWayne-lm6xt
      @BruceWayne-lm6xt 2 วันที่ผ่านมา

      yes
      me toooo

    • @dipanshubose-u9b
      @dipanshubose-u9b วันที่ผ่านมา

      Yeah just forgot the case where theres is a robber at the destination cell

  • @Its_Shubham_Negi
    @Its_Shubham_Negi 2 วันที่ผ่านมา

    Thanks ❤

  • @DarkDragon-bz6qp
    @DarkDragon-bz6qp 2 วันที่ผ่านมา +1

    Found this question tough

  • @KedarBhawthankar
    @KedarBhawthankar วันที่ผ่านมา

    you explain very well but i dont understand

  • @nikhilprakash729
    @nikhilprakash729 2 วันที่ผ่านมา

    nice..