Sum Query in 2D Immutable Array Dynamic Programming

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • / tusharroy25
    github.com/mis...
    github.com/mis...
    Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2).

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

  • @Official-tk3nc
    @Official-tk3nc 4 года назад +39

    Hope you all get placed in your dream company: All the best guys

  • @tirushma
    @tirushma 8 лет назад

    No one can replace you....Who care about Attendance in NIT if Tushar Roy is here...!!!
    #Placed in SAIL #Aapki Meharbaani

    • @tirushma
      @tirushma 8 лет назад

      +Tushar Roy Qualified from Gate sir

    • @tirushma
      @tirushma 8 лет назад

      +Tushar Roy thank you so much.....

  • @vikasshivashankara878
    @vikasshivashankara878 4 года назад +5

    Thanks Tushar, I totally understood this algorithm hopefully i can apply in any problems involving using matrix sum 2d array.

  • @AkankshaSingh-yu4lg
    @AkankshaSingh-yu4lg 7 лет назад +3

    Omg , finally i understood the algo , best explanation . Never knew that it was so easy.

  • @shashankrajholavanalli2868
    @shashankrajholavanalli2868 7 лет назад +3

    You are too good at explaining Tushar. Keep it up :)

  • @DK-ox7ze
    @DK-ox7ze Год назад

    What's the logic behind calculating prefix sum for each cell? What's the intuition behind the formula you used?

  • @shyamtripathy5084
    @shyamtripathy5084 5 лет назад +1

    Awesome.. The code suggested by you was like 100 % faster in leetcode. The solution i thought was using a 3d matrix and used DP. I really appreciate this video

  • @namanyourfriend1998
    @namanyourfriend1998 4 года назад +1

    Hello Tushar...Great video. I was curious about the case where the matrix is not immutable.

  • @umeshchand2211
    @umeshchand2211 8 лет назад +1

    Amazing tutorials ....wish you best of luck for mission-peace :)

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

    Thank you :D finally understood this algo

  • @Diptoredwan
    @Diptoredwan 8 лет назад +1

    Hello +Tushar Roy , Your tutorials are very helpful. Thanks for these amazing tutorials. I would like to request for a tutorial on Suffix Automaton. :)

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

    Is there someone who can actually code this time efficient solution during an interview w/o having seen the problem before?

  • @ankushgats
    @ankushgats 8 лет назад +1

    Thanks again Tushar. You made DP look so easy for me.

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

    Thanks for the great explanation

  •  8 лет назад +1

    my hero!! you are the best bro !! tks a lot

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

    why he isn't active anymore?

  • @priyankpande9
    @priyankpande9 8 лет назад

    Hi Tushar,
    Your tutorials are very helpful.
    If possible please cover these 2 questions -
    1. All possible increasing subsequences of numbers in a linear array having gcd 1 of any length.
    2. How to answer question when asked about searching/auto correction in a dictionary -
    As per I know Trie can be a way but that is a prefix based solution
    Or edit distance will take too much time to check with all the words available ?

  • @GeraldoLopez
    @GeraldoLopez 4 года назад

    saw three videos trying to explain the problem, yours by far is superior. thanks.

  • @kunalkathpal7167
    @kunalkathpal7167 8 лет назад

    Tushar Roy , i must say "fabulous explanation!!"

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

    What difficulty shall we face if we didn't allocate extra row and extra column in second matrix?

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

      Then we can't directly use the terms T[i-1][j], T[i][j-1] and T[i][j] in case of the elements in first row and columns(2,0,-3,4,,,6,5,2).
      Right?

  • @rlalduhsaka6746
    @rlalduhsaka6746 8 лет назад

    hello Tushar. can you please make some tutorials in fault tolerant systems?

  • @ivanbogatyrev2388
    @ivanbogatyrev2388 4 года назад

    Great explanation! Thank you.

  • @ranesh237
    @ranesh237 5 лет назад

    Is this a floyd-warshall algorithm?

  • @andreiivasko949
    @andreiivasko949 4 года назад

    Amazing, thanks Tushar!

  • @normalpeople3441
    @normalpeople3441 4 года назад

    one of the best explanation thanks man..

  • @stdiosus
    @stdiosus 8 лет назад +1

    Спасибо!

  • @musabbirahmedkhan7049
    @musabbirahmedkhan7049 7 лет назад

    way of teaching is the best

  • @FinanceStoryTime
    @FinanceStoryTime 8 лет назад

    Fantastic explanation!! Wow!!

  • @ErfanHossainShoaib
    @ErfanHossainShoaib 8 лет назад

    one of the great tutorial...

  • @manishasinha6694
    @manishasinha6694 7 лет назад

    Sir, your way of teaching is the best.. please suggest best site for coding?

  • @narendraparmar1631
    @narendraparmar1631 5 лет назад

    Thanks 😆

  • @yamanshiekhdeia4778
    @yamanshiekhdeia4778 5 лет назад

    great job!

  • @wukunliu1714
    @wukunliu1714 4 года назад

    big fam!!

  • @daydreameravani
    @daydreameravani 8 лет назад

    Helps a lot!

  • @judemartin8369
    @judemartin8369 8 лет назад

    Awesome !

  • @surajch2678
    @surajch2678 4 года назад

    👏

  • @shuvendubikash3792
    @shuvendubikash3792 8 лет назад

    Will u please write the output of your program in comment inside the code that you provide in GitHub. As I am a C++ programmer I can not test your java code nd I have to write my own code, I am left with a little confusion whether my output is write or wrong. if u start doing so, it will be better for us.
    thank you...