Тёмный

Lecture40: Rat in a Maze Problem || C++ Placement Course 2022 

CodeHelp - by Babbar
Подписаться 564 тыс.
Просмотров 197 тыс.
50% 1

In this Video, we are going to continue exploring a very important concept i.e. Recursion.
There is a lot to learn, Keep in mind “ Mnn bhot karega k chor yrr apne se nahi yoga ya maza nahi aara, Just ask 1 question “ Why I started ? “
Visit Coding Ninjas: bit.ly/3cfdKTe
Discord Server Link: / discord
Course Flow: whimsical.com/dsa-4-placement...
Notes Link: drive.google.com/file/d/1XJ0W...
Code Links: github.com/loveBabbar/CodeHel...
Question Links:
- Rat in a Maze Problem: practice.geeksforgeeks.org/pr...
Do provide you feedback in the comments, we are going to make it best collectively.
Connect with me here:
Instagram: / lovebabbar1
Twitter: / lovebabbar3
Telegram Group Link: Love Babbar CODE HELP
telegram.me/lovebabbercodehelp
Intro Sequence: We have bought all the required Licenses of the Audio, Video & Animation used.
Timestamps:
00:00 - Introduction
00:33 - Question [Rat in a Maze Problem]
03:30 - Promotion
04:21 - Approach
14:43 - Code
23:21 - Dry Run
28:15 - Recursion Tree
#DSABusted #LoveBabbar

Опубликовано:

 

28 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 481   
@Ayush_.
@Ayush_. 2 года назад
Congratulations To Code Help Family We have successfully completed 40 lectures of DSA 40++ hours fresh content 💥 "In last 56 days from 15 Nov 2021 Mene iss channel se itna kuch shikha he jitna mene apni poori college life me nhi shikha." Thanks to One & Only mr. Love Babbar Sir( Babbar bhaiya❤️ ) .... *Babbar* shirf naam hi nhi kaam bhi bolta he .....💥💥
@learncode7267
@learncode7267 2 года назад
❤❤❤
@Ayush_.
@Ayush_. 2 года назад
itne hard que ko itni easy tarike se samjha diya .. mere chote se dimaag me halchal mach gai😂
@aryan5035
@aryan5035 2 года назад
10 day recursion challenge completed, despite of you being covid positive. This shows how consistent you are, and how you do what you say, whatever situation may come. That's why I #believeinBabbar . Hats off to you, bhaiya. It feels great watching your new video everyday when it comes, with you I am also trying to be consistent. Thank You.
@chaitanyasawant776
@chaitanyasawant776 2 года назад
No one can come close to quality and consistency of your content. Thank u bhaiya.
@shubhamkhati1503
@shubhamkhati1503 Год назад
you wont believe, on the start of the lecture i thought to give it a try by myself and I was able to solve it.......can't express my love for you in words finally i can do recursion problems
@riteshjana2629
@riteshjana2629 Год назад
You will be the future pride of our nation bro😂😂😂
@sumitvishwakarma1075
@sumitvishwakarma1075 Год назад
@@riteshjana2629 What's there for laughing on him ??? People like you can only laugh on others
@universalcosmologist3675
@universalcosmologist3675 10 месяцев назад
bhai ye to kafi badi baat ho gayi
@ayushraj6525
@ayushraj6525 2 года назад
Best explanation Bhaiya😁. Itne aache se recursion tree kisi ne nahi samjhaya hai. This series is like life saver for me becuz I am currently pursuing electrical engineering but my interests are in BlockChain Development and problem solving. So your videos are not just helping the CSE students. Its reaching and helping to all the students who wants to enter in the software industry and follow their passion.
@sahilwagh7730
@sahilwagh7730 Год назад
class Solution{ private: bool isSafe(vector &m,int n,int x,int y,vector visited){ if((x>=0 && x=0 && yreached at destination if(x==n-1 && y==n-1){ ans.push_back(path); return ; } visited[x][y]=1; //down int newx = x+1; int newy = y; if(isSafe(m,n,newx,newy,visited)){ path.push_back('D'); solve(m,n,newx,newy,path,ans,visited); path.pop_back(); } //Left newx = x; newy = y-1; if(isSafe(m,n,newx,newy,visited)){ path.push_back('L'); solve(m,n,newx,newy,path,ans,visited); path.pop_back(); } //Right newx = x; newy = y+1; if(isSafe(m,n,newx,newy,visited)){ path.push_back('R'); solve(m,n,newx,newy,path,ans,visited); path.pop_back(); } //Up newx = x-1; newy = y; if(isSafe(m,n,newx,newy,visited)){ path.push_back('U'); solve(m,n,newx,newy,path,ans,visited); path.pop_back(); } visited[x][y]=0; //backtracking } public: vector findPath(vector &m, int n) { // 0---> not allowed // 1--->allowed vector ans; //not allowed at starting coordinate if(m[0][0]==0){ return ans; } //starting coordinate int srcx =0; int srcy =0; vector visited = m; for(int i=0;i
@cec408_adityachoudhari5
@cec408_adityachoudhari5 11 месяцев назад
Thx
@devanshusahoo
@devanshusahoo 2 года назад
Truly a great video! I understood the entire concept. You have made me love coding!
@aryanjha4885
@aryanjha4885 2 года назад
yarr bhaiya kya mast consistency hai aapke course ki, maza aa gya🤩🤩 Although me yaha tk pahucha nahi but aapki consistency dekh kar motivate ho jata hu.😊
@hypedpandaa
@hypedpandaa 11 месяцев назад
Kya samjhaya hai bhai maza aa gya, itna ache se jo last mein dry run ki that was much needed.
@meeninathdhobale7154
@meeninathdhobale7154 2 года назад
Samaj gaya bhaiya. Bohat badhiya explanation tha. First time ye problem dekha maine aur usi me samj gaya approach kya hona chahiye. Thank you so much!
@mdwaqar7401
@mdwaqar7401 9 месяцев назад
Mast Samjhaya aapne bhaiyya. Yes Recursion and BackTRacking bohot Tough lagta ha humko. Bohooot Practice karna hoga. But Explained Exceptionally well!
@_S_AmitPandey
@_S_AmitPandey 2 года назад
omg that was a phenomenal explaination , never thought this would be that easy.💥
@belalnaim391
@belalnaim391 2 года назад
Who else could have explained in such a way, hats off!!
@anujkhare3815
@anujkhare3815 2 года назад
i watched your video on advanced binary search where you covered questions like roti pratha,painter's partition and aggressive cows.I loved your explanation. It only took me book allocation problem to properly understand,after that i was able solve to all the other questions without looking at their explanations. however,i watched the whole video to make sure i was not missing any important analysis or anything like that.
@bitsat1779
@bitsat1779 6 месяцев назад
Awesome explanations bhaiya, 2 years since the series started but still best on youtube💯💯🔥🔥
@himanshun1207
@himanshun1207 2 года назад
You are truly doing a great job brother, hats off to your dedication and more power to you ✨✨✨
@pranavsingh7770
@pranavsingh7770 Год назад
i am SDE-2 @Global Payments Inc,(TSYS) Noida. Following all your videos in this series. Had started 1 month ago. was able to solve this Problem without seeing your solution based on the concepts developed in the last 9 lectures. Great videos !!!!!!
@animallover2205
@animallover2205 2 года назад
faad explaination...itni kushi...itni kushi mujhe aaj tak nahi hui... bhaiiya kya samjhaya hai ye, samajh aajane ki kushi me kya kya likhdu me.... Maje aagye bhaiya😁
@none2868
@none2868 Год назад
Best problem solving course ever. Thank you very much I am eternally grateful to you
@ishashukla5263
@ishashukla5263 2 года назад
Thank you, bhaiya! Your consistency motivate me to practice consistently.
@hetpatel1772
@hetpatel1772 Год назад
A great effort by love bhaiya personally completed the recursion series and it is one of amazing series i had watched for recursion. love bhaiya had explained it in a very base form so that new people can visit anytime and master into recursion. hats off to you crack placement ++ ;
@venomhighs1937
@venomhighs1937 Год назад
kya hi hawwa bana ke rakha rha logo ne rate in a maze ka !!! bhaiya maza hi agya !! thank you so much !!
@manishvijay6794
@manishvijay6794 2 года назад
smjh aa gya truely appreciated content aaj tk ase codes ko mug up krne ka try krta tha but ab logically bhi smjh aa rhe h thnks a lot for your effort
@deepjyotidebnath4122
@deepjyotidebnath4122 2 года назад
Never find such video on RU-vid,,,,,, Great explanation bhaiya 💯 Really impressed ❤️
@rajagupta9912
@rajagupta9912 2 года назад
Very Good Explanation! Keep it up👍 Bhaiya❤❤❤ knowledge++; confidence++;
@curiosity4261
@curiosity4261 Год назад
Best recursion series on RU-vid 👍
@TechUprise-by-Jyoti
@TechUprise-by-Jyoti 2 года назад
Lecture video after video on main channel 😱 consistency OP bhaiya ❤️😊 Thank you so much!!
@RohitRana-tz2lr
@RohitRana-tz2lr 2 года назад
Thanks bhaiya for explaining to us this amazing problem... mja hi aa gya bhaiya ....hats off to you
@theelitecoder5981
@theelitecoder5981 Год назад
Brother... Crystal clear explanation 🤍🤍✨✨ World's best explanation to this problem 🧡✨ Thanks a lot Babbar Bhaiya 🧡✨
@Krampushivam
@Krampushivam Год назад
life saver man. love you bhaiya🥰🥰.hats off to your effort.
@anuragpandey8165
@anuragpandey8165 2 года назад
Was waiting for this since morning.
@dhirajpawar7643
@dhirajpawar7643 Год назад
Great content bhaiyya. Easily able to understand all concepts. ❤️
@satyajitpatra5737
@satyajitpatra5737 Год назад
loving the content provided by you all for free ....... hats off to you bhaiya
@afridihaque5700
@afridihaque5700 2 года назад
Amazing content bhaiya, Thank you so much. Love from Kolkata.
@vivan1852
@vivan1852 2 года назад
Consistentency++, thank you Bhaiya for this wonderful series
@ranishmahajan6994
@ranishmahajan6994 2 года назад
Present Bhaiya..Thanks for this amazing course
@ujjwalverma_
@ujjwalverma_ 2 года назад
Agya Samajh pura Recursion, AAg lga di bhaiya 🔥🔥🔥
@Abc-lr4bf
@Abc-lr4bf Год назад
bhai samajh agya finished recursion today everything so crystal clear thankssss a lotttt
@codeforsoftwarecfs8725
@codeforsoftwarecfs8725 Год назад
Samagh a gya bhaiya Best DSA course in youtube
@I_Anupam_Pandey
@I_Anupam_Pandey 2 года назад
Lecture 40 attendance. Your consistency motivate us to practice consistently
@himanshu_047
@himanshu_047 Год назад
Your dedication to teach is greater than our dedication to learn❤️🔥
@rohan1765
@rohan1765 2 года назад
Thanks bro, course it awesome and it was extremely interesting problem 😀😀
@AmanKumar-ec6bz
@AmanKumar-ec6bz 2 года назад
just I am coming to your channel then just do like your video because your consistency is my motivation.
@mohammadanaskhan9294
@mohammadanaskhan9294 Год назад
well taught bhaiya it clears the Concept "Samajh aagya bhaiya" . I tried my best to grab the concept from other video's but failed . Tnx a lot bhaiya for teaching us literally ur videos helps us a LOT.
@Surya-km7jy
@Surya-km7jy 2 года назад
It's going very awesome ❤️ Please keep it up❤️
@vakhariyajay2224
@vakhariyajay2224 Год назад
Thank you very much. You are a genius.
@aryanmaniyar3475
@aryanmaniyar3475 Год назад
Jabardast samjha bhaiya :) Mein bhi infinite loop mein phasa tha, visited array waali trick mast lagi seekhne mein 😊
@shobhitshrivastav9775
@shobhitshrivastav9775 2 года назад
Your consistency is awesome ..💯💯
@varshadagar2140
@varshadagar2140 2 года назад
2nd view 😎 Great going placement series 🔥 Just like a fire 🔥🔥
@aparnamanna1369
@aparnamanna1369 2 года назад
Consistency = babbar bhaiya Bhaiya loving your DSA series I'm only following u bcz Babbar Bhaiya hai toh placement mumkin hai
@tejassahu9859
@tejassahu9859 Год назад
Thank you bhaiya. I made it by myself. I saw this question 3 months back in Sharaddha didi's video. I was very scared of this question . But after following your 10 video series I did It very easily. You have no idea how happy I am. Thank you so much .
@BG-lj6fw
@BG-lj6fw Год назад
i can't believe this but i am able to solve it just by taking the hint of the visited matrix from ur vdo. I was so poor at recursion earlier but ur explanation made the topic easy. thanks bhayya! my best wishes to u.
@vaibhav0511
@vaibhav0511 2 года назад
Best RU-vid Video Of this Topic 🔥🔥
@yashshrivastava7316
@yashshrivastava7316 2 года назад
instead of increasing the space complexity by adding a visited array, we could just change the value in original array to 0 for visited blocks and then backtrack it to 1 after all up , down, left and right functions are called
@vishvamsalwan5433
@vishvamsalwan5433 Год назад
it will overwrite that one which are giving us path so we will not able to find next block as all will be intialize to 0
@RahulKumar-xl3dd
@RahulKumar-xl3dd Год назад
Samajh gaya bhaiya. Thank you
@abhishekmasali5351
@abhishekmasali5351 2 года назад
Bhaiya 10 days challenge Completed Thank you so much for such great dsa series :)
@tanishqige3129
@tanishqige3129 Год назад
Badhiya se samaj aa gya bhaiya♥️
@visheshkaran7083
@visheshkaran7083 2 года назад
Thank you soo much bhaiya you are my only hope to get a better placement
@moviesjhannat
@moviesjhannat 2 года назад
Love you babbar bhaiya Clear Explanation
@Amankumar-tu9ku
@Amankumar-tu9ku 2 года назад
Present Bhaiya ji Aaj fir maza aaya Soon everyone will admit this is the BEST DSA COURSE❤❤❤❤❤
@savy9554
@savy9554 2 года назад
Consistancy , explanation 🔥🔥. Don't let the flow to break , bhaiya 😁♥️
@Jai-aleti
@Jai-aleti 2 года назад
Thanks a lot for the wonderful course.I request you to share the python code as well for the topic discussed in the videos.
@captain1438
@captain1438 2 года назад
Bro really it is too good content we found many learning channel but not like this I have suggestion to make series on compitive programming. We need this type of vedio for learning and solving question Make series on solving problems Plzzzzzzzzzzzzzzzzzzzzzzzzzz This type of vedios r not available in youtube specially in hindi
@utkarshsingh3319
@utkarshsingh3319 Год назад
Upasthit guru ji❣
@Vivek23_2
@Vivek23_2 2 года назад
Inspirational consistency babbar sir.
@Aman-sf4ez
@Aman-sf4ez Год назад
samajh mein aagaya sir...
@RohitKumar-oo8lo
@RohitKumar-oo8lo 2 года назад
Keep the Josh HIGH bhaiya !!!🔥🔥 Hum pichli waali videos ko cover up kar rhe hai..to new videos pe "instantly" zyada views nhi aa rhe honge..aap bas Continue rakhiye..iss Flow ko...videos complete karke..placement lagwaana..hamari zimmedaari 🔥⚡💪 Kuch time me hi cover up kar lenge..phir saath hi saath videos dekhenge. #believeinbabbar #EffortMaaro
@umangsachdeva9920
@umangsachdeva9920 2 года назад
Present sirji 👍 What an amazing course🙏🙏👍❤️ Hats off to your dedication 🤗🤗❤️
@suraj_patwa
@suraj_patwa Год назад
Mai 2 times dekha but bahut axe se samaj aa gaya
@subhamahir5599
@subhamahir5599 2 года назад
I was doing everything right, just stucked in infinite recursions because of 1,1,1... everywhere. Thanks for 8:43 you solved my problem!
@focus.placement5589
@focus.placement5589 2 года назад
crystal clear bhaiya ekdum full thankyou bhaiya
@a.j1589
@a.j1589 9 месяцев назад
maza aa gaya bhaiya.....Thankyou sooo much !!..🔥🤩🔥
@060_abhinav7
@060_abhinav7 10 месяцев назад
solved this question on my own....just had an error in the code...Thanks for making recursive topic this easy for me
@keshavgambhir9894
@keshavgambhir9894 2 года назад
Present bhaiya You are highly consistent
@_SahilShah
@_SahilShah 2 года назад
Samj aa gaya hai bhaiya! Marked Attendance!🔥💫
@sahilanand30
@sahilanand30 2 года назад
Clear explanation 👏👏
@JyotiprakashMandal-bp8ng
@JyotiprakashMandal-bp8ng Год назад
Great Love Babar Bhaiya🥰
@myyoutubeisthis
@myyoutubeisthis Год назад
samajh me aagaya thank you bhaiya
@sanchiagarwal4909
@sanchiagarwal4909 Год назад
Consistency++ and bohot aache se samaj aaya bhaiya... Himmat nahi harenge🙌🏻🔥🚀✅
@MdSaddam-sg6jq
@MdSaddam-sg6jq Год назад
Mera confindence down hone laga tha ye lecture ke bad Par ab...Himmat nahi harenge
@keerthanraobj2149
@keerthanraobj2149 2 года назад
Good and awesome consistency bhaiya 🤝🥰
@samarthamera
@samarthamera Год назад
bhaiya ek numeber explanation 😃😃
@curiosity4261
@curiosity4261 Год назад
Samajh aa gaya bhaiya❤
@arnabbanerjee33
@arnabbanerjee33 2 года назад
Love it broo thank you so much❤
@kpsingh2647
@kpsingh2647 Год назад
Sirf approach dekh ke hi correct solution ban gaya. Aa gai recursion ab.
@sciencestreamers8509
@sciencestreamers8509 2 года назад
Best explanation for Rat in a Maze problem
@JugalLohani
@JugalLohani Год назад
Samaj aa gaya sir.... Thank you so much sir
@peterpace3379
@peterpace3379 Год назад
Samajh aa gaya bhot achhe se
@charansn4838
@charansn4838 Год назад
i loved your way of teaching bhaii ❤
@manovmandal3511
@manovmandal3511 Год назад
Completed This Bhaiya! Samjh agaya! Interesting question tha, spent more than an hour on this haha Thank you so much
@ISHANTARORA-ol8ip
@ISHANTARORA-ol8ip 2 месяца назад
Sir you are amazing and I think majority of us liked the content.
@anishbarnwal5676
@anishbarnwal5676 Год назад
Thankyou sir for this awesome lecture
@amanaditya5602
@amanaditya5602 Год назад
Best DSA course...... thank you for explaining recursion in such an easy way....
@codewithmames
@codewithmames 11 месяцев назад
hello bro
@adityaraj-zm7zk
@adityaraj-zm7zk 2 года назад
Bahiya apke ish course se bahut baccho ka faida hoga bahut maja aaraha hai ish course me
@iEntertainmentFunShorts
@iEntertainmentFunShorts 2 года назад
Smaj aa gya bhaiaya mast backtracking kya hoti h samaj aa gya 3-4 problems or kra dijiyei iski toh or maja aa jayei ✔ 😄 PS: maja aa gya++ (quality question)
@prabhakarjha8873
@prabhakarjha8873 Год назад
maja aagaya bhaiya kya smjhaya h aapne jabardast
@sagardebnath8842
@sagardebnath8842 Год назад
Samajh ageya bhaiya...2 ghante lag geya better understanding ke liye
@yogeshyadavas
@yogeshyadavas 2 года назад
good quality content, thanks bhaiya
@TensionNOTPratik
@TensionNOTPratik 2 года назад
consistent bhaiya .......Great....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@avmalik3705
@avmalik3705 2 года назад
Thx Bhai u r teching is so awesome