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

Поделиться
HTML-код
  • Опубликовано: 17 ноя 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 ] : ruclips.net/p/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls
    ✅✅✅[ Graphs Data Structure ] : ruclips.net/p/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C
    ✅✅✅[ January Leetcoding Challenge ] : ruclips.net/p/PLJtzaiEpVo2wCalBcRcNjXQ0C6ku3dRkn
    ✅✅✅[ December Leetcoding Challenge ] : ruclips.net/p/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA
    ✅✅✅[ November Leetcoding Challenge ] : ruclips.net/p/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e
    ✅✅✅[ August Leetcoding Challenge ] : ruclips.net/p/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe
    ✅✅✅July Leetcoding challenges: ruclips.net/p/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC-
    ✅✅✅June Leetcoding challenges: ruclips.net/p/PLJtzaiEpVo2xIfpptnCvUtKrUcod2zAKG
    ✅✅✅May Leetcoding challenges: ruclips.net/p/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e
    ✅✅✅Cracking the Coding Interview - Unique String: ruclips.net/p/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE
    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.

  • @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!

  • @Saurabhkumar-vk7iq
    @Saurabhkumar-vk7iq 3 года назад

    Nicely Explained Kudos

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

    Amazing clarity of thought. Keep going.

  • @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 👏🏻

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

    Great Work Buddy!

  • @jsuryakt
    @jsuryakt 2 года назад +1

    Awesome

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

    Good explanation

  • @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) ?

  • @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.

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

    Pls solve through DP

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

    1283. Find the Smallest Divisor Given a Threshold