No video

House Robber (LeetCode 198) | Full solution with diagrams | Easy explanation | Study Algorithms

  Рет қаралды 26,806

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Пікірлер: 101
@manojtate9604
@manojtate9604 6 ай бұрын
Top-notch explanation available on KZfaq, thanks!
@KodeWithKaran
@KodeWithKaran 6 ай бұрын
finally i can sleep peacefully now...what an explaination. just wow... Thanks man!!!
@nikoo28
@nikoo28 6 ай бұрын
Great to hear!
@zeltrax00
@zeltrax00 9 ай бұрын
I used chatgpt to generate solution but I cannot understand it. After watch this video, I understand every single line of the chatgpt code. You're the best
@malishagavali9225
@malishagavali9225 2 күн бұрын
i first went through the entire playlist of DSA by kunal and now Im here to learn the remaining topics. You honestly teach so well!
@surendhar.v4952
@surendhar.v4952 Жыл бұрын
Nikhil , You don't know , How you inspired me in teaching the problem and making the things simple and crisp. I really love the way how you taught your final thoughts. Gained some inspiration as well as the solution. Keep rocking Nikhil 🔥.
@papercut._.
@papercut._. 8 ай бұрын
bro you're a legend I can usually come up with memoization you're way of explaning made it easy for me to translate my understanding to tabulation. thanks a lot!
@hari7110
@hari7110 6 ай бұрын
Bro your explanation is just awesome!! u explained each step in detail
@010101dddm
@010101dddm Жыл бұрын
Best explanation on you tube, thank you
@kvnrthr1589
@kvnrthr1589 17 күн бұрын
Fantastic explanation! I watched a few other videos and didn't understand, but with yours the logic finally clicked...
@yomamasofat413
@yomamasofat413 2 ай бұрын
omg my brain is physically hurting from this...
@siddharthmehta4223
@siddharthmehta4223 Жыл бұрын
dayum...... awesome explanation brother. bows down. live long Nikhil.
@rishichansauria3658
@rishichansauria3658 Жыл бұрын
The way you explain is just awesome..please don’t stop.. after going through your videos I’m in love with DP ..thanku so much.
@nikoo28
@nikoo28 Жыл бұрын
That is so amazing to hear 🤩
@serg1778
@serg1778 Жыл бұрын
@@nikoo28 really awesome )
@carl1809
@carl1809 7 ай бұрын
Amazing explanation. I was looking everywhere why this works and you manage to explain it in a way that clicked
@TalesOfGranny
@TalesOfGranny 8 ай бұрын
Very well explained. U have knack of teaching
@lucianpetriuc7373
@lucianpetriuc7373 6 ай бұрын
Leetcode is art and you're Picasso. Incredible explanation Nikhil!
@varoonsb
@varoonsb Ай бұрын
Thank you so much! First time seeing someone explaining solution as good as NeetCode1
@shraddhajain8935
@shraddhajain8935 Ай бұрын
your explanations are amazing,, I understood it quickly
@qR7pK9sJ2t
@qR7pK9sJ2t 8 ай бұрын
Excellent.. The best explanation on utube !
@anarych1
@anarych1 6 ай бұрын
Much better explanation than neetcode's one. Thank you!
@devprasad8767
@devprasad8767 2 ай бұрын
Yes, but his code is more optimal in space complexity
@unknownman1
@unknownman1 9 ай бұрын
No words. Simply wow!!!
@nikoo28
@nikoo28 8 ай бұрын
your comment - "just looking like a wow"..thanks for the support.
@eizinzinlin1261
@eizinzinlin1261 13 күн бұрын
Very clean explanation, Thank you
@manishbarnawal2865
@manishbarnawal2865 6 ай бұрын
My First watch of this channel video !! Great explanation !! This I call as a social service which any one can avail in this country and will remember your explanation !! Subscribed !!
@nikoo28
@nikoo28 5 ай бұрын
thanks for the sub!!
@ghanashrim2839
@ghanashrim2839 Жыл бұрын
This is the best I've seen anyone explain the problem. Thank you so much yaar.
@nikoo28
@nikoo28 Жыл бұрын
always happy to have you as my audience :)
@yusef_01
@yusef_01 Ай бұрын
Excellent explanation, thank you
@kamalasowmya7120
@kamalasowmya7120 6 ай бұрын
thank you for breaking this down! :)
@gojosatoru988
@gojosatoru988 Жыл бұрын
Very to understand explanation, Loved it.
@AkashReddy-e6j
@AkashReddy-e6j Ай бұрын
one that stood out 🔥🔥
@daffapradana8557
@daffapradana8557 Жыл бұрын
The best explanation that i have ever found! thank u so much
@DilshadAhmad-pc1tm
@DilshadAhmad-pc1tm 7 ай бұрын
Bro..U r tooo good.. The way u explained is awesome, super. Please keep it up...
@user-ll5qj9tj5c
@user-ll5qj9tj5c Ай бұрын
u earned my respect
@leonardocavalcanti1225
@leonardocavalcanti1225 15 күн бұрын
Excelente explicação! Muito obrigado!
@badrinarayanans355
@badrinarayanans355 8 ай бұрын
Clearly explained, thankyou.
@rajeshpaithari7320
@rajeshpaithari7320 4 ай бұрын
Great logic and great explanation! Expecting more videos.
@anonymous-ze5fg
@anonymous-ze5fg Жыл бұрын
Your contents are great, highly appreciated , Please keep uploading more interesting problems.. Thanks
@nikoo28
@nikoo28 Жыл бұрын
More to come!
@ramswrooppatidar7599
@ramswrooppatidar7599 7 ай бұрын
wow just a amazing , explaination great work
@jus3472
@jus3472 6 ай бұрын
Great explanation thank you.
@user-fk2xu3fh5r
@user-fk2xu3fh5r 9 ай бұрын
Brother thank you so much 🥺❤ now I understand after you drawing those pictures
@RohitSharma-mg3np
@RohitSharma-mg3np 7 ай бұрын
Subscribed , Nice Explaination
@sudhanshukushwaha6351
@sudhanshukushwaha6351 10 ай бұрын
masterpiece
@quickfeet7778
@quickfeet7778 8 ай бұрын
interesting, i've been solving dp problems which only use recursion, so I assumed that dp generally applied only to recursive solutions, its good to see it used in a different way, thanks!
@nikoo28
@nikoo28 8 ай бұрын
Every recursive problem has an iterative solution..and I usually prefer those..recursive code is super hard to read
@AndyBnq
@AndyBnq 2 ай бұрын
I swear, you are awfully underrated man, as opposed to Neetcode who are so overrated. No offence to Neetcode. Everytime I don't understand an explanation from Neetcode (which is almost always the case from problem 10 onwards in Neetcode Blind 75), I always come to you and you never let me down.
@nikoo28
@nikoo28 2 ай бұрын
everyone has their own style of teaching, and everyone understands differently. Whatever helps you!! 😄 Glad I am able to help you out. You can help by sharing and subscribing 😄
@sukyuit
@sukyuit 9 ай бұрын
max waali condition jo aapne btai woh hum pehli baar mein kaise sochein khud se ,for future problems jo developer solve krega
@nikoo28
@nikoo28 9 ай бұрын
for dynamic programming, the more you practice, the more patterns you will start seeing. Most of the problems work on the same idea, the words are just twisted. One thing that often helps me is visualize where do I have to ultimately reach. Then start to build a backwards solution.
@adityamaurya554
@adityamaurya554 5 ай бұрын
ek no bhai
@YashRekha594
@YashRekha594 9 ай бұрын
Thank you very much for the well-explained video 👍
@candichiu7850
@candichiu7850 Жыл бұрын
The best on KZfaq!
@nikoo28
@nikoo28 Жыл бұрын
So heartwarming to hear that :)
@tanvirazad49
@tanvirazad49 3 ай бұрын
thank you 🎉
@puneetchhabra2578
@puneetchhabra2578 Жыл бұрын
Thankyou sir!! Great Explaination, beginners friendly.
@rogerthat7190
@rogerthat7190 Жыл бұрын
Thank you!!
@abhisheknandann
@abhisheknandann Жыл бұрын
Great video boss!
@khyatikakkar9259
@khyatikakkar9259 2 ай бұрын
Amazing explanation !!
@jayprajapati9
@jayprajapati9 Жыл бұрын
best explanation
@makethemostOfwhatYouGot
@makethemostOfwhatYouGot 3 ай бұрын
Incredible stuff !
@mukeshperiyasamy3364
@mukeshperiyasamy3364 Жыл бұрын
Great explanation, Thank you for sharing your knowledge.
@nikoo28
@nikoo28 Жыл бұрын
My pleasure!
@subee128
@subee128 8 ай бұрын
Thanks
@jishnus1526
@jishnus1526 9 ай бұрын
Excellent explanation 🤩
@rambhaktuchihaobito7987
@rambhaktuchihaobito7987 Жыл бұрын
sir the way u teach...... is so good ❣❣
@nikoo28
@nikoo28 Жыл бұрын
Thank you so much 😀
@504rishukumar4
@504rishukumar4 7 ай бұрын
Nice Explanation,
@kunalkheeva
@kunalkheeva Жыл бұрын
it really helped bro!
@fagunraythatha5601
@fagunraythatha5601 Жыл бұрын
Hey buddy, I have been coding fgr a while, I use your videos as my revision. You are great brother, can you bring a series of hard algorithm with dynamic programming solution
@nikoo28
@nikoo28 Жыл бұрын
for sure, i am planning to bring in all the hard problems as well. just need some time to build up the basics. I will start on those hard problems by the end of the year.
@ganesang7217
@ganesang7217 7 ай бұрын
😎 cool
@beingstudent5571
@beingstudent5571 2 ай бұрын
I think the way you explain is tabulation not memoization btw very excellent explanation .
@nikoo28
@nikoo28 Ай бұрын
tabulation is a way of memoization.
@lo_sten
@lo_sten Ай бұрын
how to return the houses he robbed?
@mock1112
@mock1112 Жыл бұрын
Amazing video
@akshitjain2906
@akshitjain2906 Жыл бұрын
legend bro legend
@VIJAYGUPTA-fc5hi
@VIJAYGUPTA-fc5hi Жыл бұрын
bro according to base case you provided what if arraylength ==0 and you are trying to access arr[0], is that not con concerning ??
@pranitagawas4806
@pranitagawas4806 7 ай бұрын
Please provide the solution to the paint fence problem
@nikoo28
@nikoo28 6 ай бұрын
i don't have access to the problem. Can you provide me an alternate link
@romanporter6331
@romanporter6331 7 ай бұрын
спасибо, очень классно всё объясняешь. Я смотрел тебя с автоматическим кривым переводом через нейросеть и всё равно всё понял)
@nikoo28
@nikoo28 6 ай бұрын
Я так рада, что смогла вам помочь.
@aswanthnarayanan
@aswanthnarayanan Жыл бұрын
Please make a video about Git
@nikoo28
@nikoo28 Жыл бұрын
that is a good suggestion. I will start preparing something on it. :)
@bhavindhobi79
@bhavindhobi79 7 ай бұрын
how can i find the houses that i robbed??
@nikoo28
@nikoo28 6 ай бұрын
start with the total loot at each index. with respect to the house you choose, store those results
@prashanthshetty8337
@prashanthshetty8337 5 ай бұрын
func rob(nums []int) int { if len(nums) == 1 { return nums[0] } if len(nums) == 2 { return max(nums[0], nums[1]) } a := nums[0] b := max(nums[0], nums[1]) for i := 2; i < len(nums); i++ { a, b = b, max(a + nums[i], b) } return b }
@AmritSingh-du7pq
@AmritSingh-du7pq Жыл бұрын
Hello Bhaiya, Can you please make a video on Check If It Is a Good Array leetcode (1250).
@nikoo28
@nikoo28 Жыл бұрын
i will add it to my queue and get a video out sometime...but to be honest..this is not a good problem to solve...doesn't actually test your logical or data structure skills.
@minnikeswarrao6185
@minnikeswarrao6185 Жыл бұрын
Sir any source to learn dynamic programming?
@nikoo28
@nikoo28 Жыл бұрын
Not to give you false hopes…but there is no source…the more you practice the more easily you will be able to identify patterns. Things will start to get a little comfortable day by day :)
@Ayush_kumar_1013
@Ayush_kumar_1013 7 ай бұрын
fail test case 1,2,3,1
@nikoo28
@nikoo28 7 ай бұрын
1,2,3,1 does give the answer as 4, which is correct. What answer do you expect ?
@pramanayagam
@pramanayagam Жыл бұрын
Bro what about input as [2,1,1,2]
@nikoo28
@nikoo28 Жыл бұрын
The output should be 4. First house and the last house.
@nikoo28
@nikoo28 Жыл бұрын
The above method will output as 4. My solution is based on the method and it gives a correct answer. Can you explain your thought process?
@pramanayagam
@pramanayagam Жыл бұрын
@@nikoo28 Ok bro
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 40 МЛН
КАКУЮ ДВЕРЬ ВЫБРАТЬ? 😂 #Shorts
00:45
НУБАСТЕР
Рет қаралды 3,3 МЛН
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 9 МЛН
House Robber - Leetcode 198 - Dynamic Programming (Python)
13:15
Leetcode 46. Permutations : Introduction to backtracking
10:06
ComputerBread
Рет қаралды 93 М.
8 patterns to solve 80% Leetcode problems
7:30
Sahil & Sarra
Рет қаралды 327 М.
How Robbing Houses Can Make You Better At Dynamic Programming
18:04
Kantan Coding
Рет қаралды 4,1 М.
Most Common Concepts for Coding Interviews
6:08
NeetCode
Рет қаралды 304 М.
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 40 МЛН