Range Sum Query 2D - Immutable | Live Coding with Explanation | Leetcode - 304

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

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

  • @AlgorithmsMadeEasy
    @AlgorithmsMadeEasy  3 ปีที่แล้ว

    We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!!
    Questions you might like:
    ✅✅✅[ Tree Data Structure ] : th-cam.com/play/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls.html
    ✅✅✅[ Graphs Data Structure ] : th-cam.com/play/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C.html
    ✅✅✅[ January Leetcoding Challenge ] : th-cam.com/play/PLJtzaiEpVo2wCalBcRcNjXQ0C6ku3dRkn.html
    ✅✅✅[ December Leetcoding Challenge ] : th-cam.com/play/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA.html
    ✅✅✅[ November Leetcoding Challenge ] : th-cam.com/play/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e.html
    ✅✅✅[ August Leetcoding Challenge ] : th-cam.com/play/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe.html
    ✅✅✅July Leetcoding challenges: th-cam.com/play/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC-.html
    ✅✅✅June Leetcoding challenges: th-cam.com/play/PLJtzaiEpVo2xIfpptnCvUtKrUcod2zAKG.html
    ✅✅✅May Leetcoding challenges: th-cam.com/play/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e.html
    ✅✅✅Cracking the Coding Interview - Unique String: th-cam.com/play/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE.html
    Struggling in a question??
    Leave in a comment and we will make a video!!!🙂🙂🙂

  • @Rahul-pr1zr
    @Rahul-pr1zr 9 หลายเดือนก่อน

    Great visual explanation! I tried a few other videos for this question but none of them were making sense. This was very helpful!

  • @arturtelezhkin632
    @arturtelezhkin632 ปีที่แล้ว +1

    Thank you. Really clear explanations.

  • @neelsoni13062
    @neelsoni13062 ปีที่แล้ว

    Really Most Easy and understandable Explanation thank you bhai

  • @fardeenmeeran3909
    @fardeenmeeran3909 3 ปีที่แล้ว +2

    This is a great example I really liked the diagram explanation helped me understand how the DP solution works. Thank you :')

  • @jatinbhatoya8420
    @jatinbhatoya8420 3 ปีที่แล้ว +1

    You always explains videos through animations which make the understanding easy. Thanks or you efforts

  • @gyanprakash302
    @gyanprakash302 2 ปีที่แล้ว

    Thankyou so much, such beautiful easy to understand solution.

  • @RadGopalakrishnan
    @RadGopalakrishnan 3 ปีที่แล้ว +1

    Amazing clarity of thought. Keep going.

  • @Saurabhkumar-vk7iq
    @Saurabhkumar-vk7iq 3 ปีที่แล้ว

    Nicely Explained Kudos

  • @sahilanower9189
    @sahilanower9189 3 ปีที่แล้ว

    Great Work Buddy!

  • @naveenchebolu6757
    @naveenchebolu6757 2 ปีที่แล้ว +1

    We are using same input matrix to store prefix sum then why space complexity is O(M*N) my thought is O(1) . Can anyone explain why it is not O(1) ?

  • @shubhamchourasia2265
    @shubhamchourasia2265 3 ปีที่แล้ว

    Having n square in constructor is fine but not in fetching sum value. Never thought this would be a test case. MiND BLOWN!

  • @AviatorBro
    @AviatorBro 3 ปีที่แล้ว +2

    thanks for the awesome approach sir. learnt something new. I wonder how you become so good with DSA and consistent that you post daily leetcode challenge solution. Keep doing this great job, thanks a ton. I would love to know your story and how you became this good with DSA , what all resources did you made use of.

    • @AlgorithmsMadeEasy
      @AlgorithmsMadeEasy  3 ปีที่แล้ว +1

      Thanks, Amartya!!
      I did nothing special, it is just consistent practice! 🙂

    • @AviatorBro
      @AviatorBro 3 ปีที่แล้ว +1

      @@AlgorithmsMadeEasy consistency is the key to success 👏🏻

  • @shivamagrawal2284
    @shivamagrawal2284 3 ปีที่แล้ว

    Good explanation

  • @jsuryakt
    @jsuryakt 2 ปีที่แล้ว +1

    Awesome

  • @prashantagrawal1140
    @prashantagrawal1140 3 ปีที่แล้ว

    Pls solve through DP

  • @soneshengg
    @soneshengg 3 ปีที่แล้ว

    This was easy to understand, but it says "Immutable " arent you changing original matrix in this case? Also seemed weird how you again declared matrix .

    • @manokumar89
      @manokumar89 3 ปีที่แล้ว

      immutable in the sense, the problem won't be asked to update any values in the matrix(this term is to come up with the proper algo, so we need not be worried about resuing the input array). Only operation is sumRegion(). check leetcode.com/problems/range-sum-query-2d-mutable/ for the mutable version.

  • @AmritAgarwal07
    @AmritAgarwal07 3 ปีที่แล้ว

    1283. Find the Smallest Divisor Given a Threshold