Never could I imagine that I would not be afraid of dynamic programming, all because of your teaching style, please keep continuing and teaching us more
Master-piece.. Hats-off to you for also adding visual graphics.. No - one would want to take any extra pain for adding visual graphics.. I think your aim is to deliver the best quality videos and explanation.. Magical !!!!!!
Hey i have one doubt. What if the max loot we get by skipping the first house is not including last index either. Means we get the max loot in the first case through second last index. In such case, it would always be good to add first house since we are no way adding last index but we can't since our array doesn't contain it. How is that case considered
Brother why new int[num.length -1] i don't understand why you set -1 and the last is private int nums, what the input i should add in that, what is int[] nums mean, omg its hard to understand brother
My god, the way you just simplified this problem is amazing. Thank you!
I have no words to thank you. I have been watching coding videos for a long.. but I have never watched such an explanation. You are the best teacher.
Do you know you are an awesome teacher?
I mean just the way you break problems and get a solution, I just love the way you explain.
Thank you so much…your words are so motivating :)
Never could I imagine that I would not be afraid of dynamic programming, all because of your teaching style, please keep continuing and teaching us more
My favorite explanation so far. Thank you for sharing this and drawing out the logic. Much appreciated.
Ur the best among all..❤
Sir you are genious .
Master-piece..
Hats-off to you for also adding visual graphics..
No - one would want to take any extra pain for adding visual graphics..
I think your aim is to deliver the best quality videos and explanation..
Magical !!!!!!
I try to add graphics to make things easier to remember. :)
Best teacher love you sir❤
Elegant explanation, perhaps best I have seen so far.
Now a days, if i want a solution, first searching your video for the problem first on TH-cam. Thank you for sharing your knowledge here.🙃🙃
Glad to hear that
you really know how to teach . great work.✅
Absolutely Wonderful Explanation sir 👏👏👏👏👏
Awesome explanation
You are a legend, thank you for making these videos.
instead of skipfirst or skiplast, we can choose max(house[first],house[last] ) and follow the same code for houserobber1
excellent explanation
Try house robber 3 as well…you are gonna love dynamic programming 😄
Thanks for your great video! It helps me a lot.
Thanks bro! This video was super useful. Watched few others but none come close to you
Glad to hear it!
Thank you!
Excellent explanation!
Super clear and great as aways!
Interesting - thanks
Amazing 🎉
Thanks!!
Thanks
Great explanation but wont this increase space complexity with 2 arrays?
O(2n) is equivalent to O(n)
acha bataye ho bhai
Brother you are handsome and talent, thank you brother 😊
So nice of you
Hey i have one doubt. What if the max loot we get by skipping the first house is not including last index either. Means we get the max loot in the first case through second last index. In such case, it would always be good to add first house since we are no way adding last index but we can't since our array doesn't contain it. How is that case considered
We consider both the cases…either we pick the first house…or we leave the first house.
The maximum of those is the max loot.
@@nikoo28 thanks ❤
@@nikoo28 let's say we get the maximum by leaving the first house, then in that case, how can we add last house as it is not in our array ?
@@learningcuriously1940 thats why we made another auxillary array for that
Brother why new int[num.length -1] i don't understand why you set -1 and the last is private int nums, what the input i should add in that, what is int[] nums mean, omg its hard to understand brother
which part are you facing a problem with?
what about only two houses then answer must be zero nh coz they are adjacent to each other.
But you can still rob one of them