3186. Maximum Total Damage With Spell Casting (Leetcode Medium)

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ย. 2024

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

  • @Algorithmist
    @Algorithmist  3 หลายเดือนก่อน

    How much damage did you take?

    • @TON-108
      @TON-108 3 หลายเดือนก่อน +3

    • @vigneshs1852
      @vigneshs1852 3 หลายเดือนก่อน +1

      both in TLE and MLE..But still grinding.. It is not accepting even in tabulation also..need to space optimization

    • @dampdigits.69
      @dampdigits.69 2 หลายเดือนก่อน

      A lot

  • @redfinance3403
    @redfinance3403 3 หลายเดือนก่อน

    Recently solved the “Delete and Earn” problem. Very similar problem and thus was a piece of cake for me! Funnily enough I used a queue to access the prev element for each i, where I would pop whilst the value at the front of the queue is < i - 2.

    • @Algorithmist
      @Algorithmist  3 หลายเดือนก่อน

      This is exactly what is meant by practicing! Sometimes you just notice very similar concepts!

  • @VarshilNarola
    @VarshilNarola 3 หลายเดือนก่อน

    that same two WA's I got.. this was tricky

  • @rohitkumarpilania94
    @rohitkumarpilania94 3 หลายเดือนก่อน +2

    memoization gave MLE, broke me