No video

Backtracking Introduction + Maze Problems - Theory + Code + Tips

  Рет қаралды 187,485

Kunal Kushwaha

Kunal Kushwaha

Күн бұрын

This video covers an introduction to #backtracking, along with maze path problems. An important video for interviews covering complete theory + code + tips.
Register now for the Battlesnake fall league: play.battlesnake.com/league/f...
Take part in the learning in public initiative! Share your learnings on LinkedIn and Twitter with #DSAwithKunal & don't forget to tag us!
👉 Resources
- Join Replit: join.replit.com/kunal-kushwaha
- Complete Java DSA playlist: • Java + DSA + Interview...
- Code, Assignments, & Notes: github.com/kunal-kushwaha/DSA...
➡️ Connect with me: kunalkushwaha.com
=========================================
Timestamps:
0:00:00 Teaser
0:00:31 Introduction
0:01:51 Maze Problems
0:03:11 Q1 : Counting Paths
0:18:08 Code for Q1
0:20:58 Q2 : Printing Paths
0:27:00 Code for Q2
0:32:18 Q3 : Including Diagonal Paths
0:35:30 Q4 : Maze with Obstacles
0:40:43 Code for Q4
0:47:55 Q5 : Including All Paths
0:51:51 Explanation for Q5
1:07:04 Backtracking Introduction
1:11:01 Code for Q5
1:14:43 Q6 : Print Matrix and Paths
1:20:44 Code for Q6
1:25:37 Battlesnake Fall League
1:27:52 Outro
#recursion #placement #dsa #interviews

Пікірлер: 301
@KunalKushwaha
@KunalKushwaha 15 күн бұрын
DSA + interview preparation playlist: kzfaq.info/sun/PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ
@komalchauhan7535
@komalchauhan7535 9 күн бұрын
Kunal Please complete this playlist
@kalpeshmali1476
@kalpeshmali1476 2 жыл бұрын
finally a teacher who understand that this topics are important to cover in depth and u have done this job 🔥🔥🔥🔥🔥
@rohitchilhorkar8114
@rohitchilhorkar8114 2 жыл бұрын
I watched all the videos of this playlist from the beginning and I must say you just made this complicated topics so easy to understand. Processed and Unprocessed String pattern is just awesome and has plenty of application's with slight variations. This video and the video before this was a cake walk for me, since I understood all the concepts very well. Thank you for making such an amazing playlist, you're really an amazing teacher. Kudos!
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Glad it was helpful!
@ALister_priyanshu
@ALister_priyanshu 2 жыл бұрын
@@KunalKushwaha yes just love the playlist by far the best OOP playlist ....just do complete the rest of the playlist...waiting for DPs and Hashmaps.
@kartikking7
@kartikking7 2 жыл бұрын
@@KunalKushwaha hey...pls finish this playlist before starting new ones! These videos are amazing and it must nit be discontinued.
@lyricalbeatz224
@lyricalbeatz224 2 жыл бұрын
I too feel the same
@Abcd-qp8gi
@Abcd-qp8gi Жыл бұрын
​@@KunalKushwahaHello sir can you help me in a program . I'm struggling. can you send your email I'd...
@nousheen05
@nousheen05 2 ай бұрын
The way you explain the thought process, just WOW. Anyone can fall in love with recursion after watching this playlist.
@techyamanbyte
@techyamanbyte 9 ай бұрын
Kunal, your DSA videos are an absolute treasure! Your ability to break down complex concepts and provide a clear thought process for solving problems is truly remarkable. Your dedication to making these topics easy to understand is greatly appreciated. Thank you for your fantastic work!
@determinator4491
@determinator4491 2 жыл бұрын
Love you're channel! I cant believe how much similar the approaches are. I would have never thought mazes and subsequences are soo similar!
@sahilgarg9340
@sahilgarg9340 Ай бұрын
Kunal, discovering your playlist is like finding a hidden gem-unexpected but incredibly rewarding. It's a fantastic collection for both students and professionals learning data structures and algorithms.
@PriyaSingh-zb5wn
@PriyaSingh-zb5wn 4 ай бұрын
watching long videos of recursion was worth it , can't thank you enough for these .🙏
@de-codr8814
@de-codr8814 2 жыл бұрын
best explanation available on youtube, literally the concept got imprinted in my mind, Kunal is too OP.
@chitvangarg201
@chitvangarg201 2 жыл бұрын
your teaching skill is just amazing i had enrolled around 10 courses but i never get such understanding of concept as i got with your lectures, thanks a bunch for providing this great DSA course for free
@shaunvarghese3400
@shaunvarghese3400 2 жыл бұрын
This is the first time i am learning backtracking....and i am glad i bumped into THIS video....very well explained....thanks Kunal...👌🙌
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Great to hear!
@Tomharry910
@Tomharry910 Жыл бұрын
While there is no dearth of online tutorials and resources available to explain these difficult and complex topics, few themselves have the clarity of these hard to grasp concepts and nobody so far explained them with such great clarity as you have done. Words fail me to express my gratitude for you. I just want to thank you from the bottom of my ❤ for the great work you are doing 🙏🙏💐
@jamespeterson7824
@jamespeterson7824 2 жыл бұрын
Amazing teaching, Amazing thought process, The way how problems are being break down as per pattern, and they are so easy to understand and solve. Hats off to you kunal. Great work towards helping others with your skills. Thanks 🙂
@dipalitusharvlogs7252
@dipalitusharvlogs7252 10 ай бұрын
There is no doubt about Kunal's teaching skills, The way he looks at camera, feels like he is Infront of me and teaching 💚
@shubhamagarwal7876
@shubhamagarwal7876 Жыл бұрын
Never in my life I could have imagined to solve or understand these problems. Thanks Kunal for such an explanation that is so generic and applicable. Watching your JAVA videos I rocked all my java interviews. This playlist is super awesome. I thank you giving my career a boost and direction.
@nikhilchauhan3506
@nikhilchauhan3506 Жыл бұрын
bhai hamne 1:11:24 m condition false kyu add kri, jes ehi nice ki true condition hit kregi wo fir se false wale ko hit kregi, please explain
@akashprasad2556
@akashprasad2556 Жыл бұрын
@@nikhilchauhan3506 If you haven't figured it out- Short answer - true wali statement tabhi execute hogi jab control return ho raha hoga.
@chaitanyaprasad6924
@chaitanyaprasad6924 2 жыл бұрын
This is Amazing!! Understood BackTracking like a charm!!! Now I;ll try Sudoko solver on my own and I'm confident I can solve it because of how clearly you taught this!!!
@ankit_1012
@ankit_1012 2 жыл бұрын
Forget about content or the way of teaching others can't match even in terms of length of any single video of this dsa playlist.. 😁😁😁 There's a reason why the Community is so much excited about this dsa course Btw now it's getting hard to match kunal's speed of uploading videos with my learning & practice speed 😅😅😅
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Thanks! Do it at your own pace.
@felixboachieyiadom4457
@felixboachieyiadom4457 Жыл бұрын
@@KunalKushwaha please do dp I'm struggling a bit with it
@apnikakshya
@apnikakshya 23 күн бұрын
SIR WHEN COVER REMAINING TOPICS​@@KunalKushwaha
@siddharthupadhyay4246
@siddharthupadhyay4246 2 жыл бұрын
Amazing, such a smooth way to build up to the last complicated solution.
@abhishekgoud12
@abhishekgoud12 7 ай бұрын
Really the way this guy clears concept is something I have seen multiple video on rat maze but this man cleared all my doubts by solving same question using different ways. Specially that last question he printed entire matrix path this give me a clear picture of all recursion calls.
@davidmwangi4312
@davidmwangi4312 2 жыл бұрын
Thanks, Kunal for this Amazing series. Keep up the good work Man.
@AmitVishwakarma27
@AmitVishwakarma27 Ай бұрын
I wanted to say by far this is the best playlist for learning DSA and algo I came across. Kudos to Kunal.. and thanks for creating such awesome contents :)
@edukondalugumma3753
@edukondalugumma3753 2 жыл бұрын
Awesome Kunal. I just started learning these DSA. Its so interesting with your videos. Kudos
@pratikshar344
@pratikshar344 2 жыл бұрын
What an explanation 🔥🔥 starting with this topic again and watched this ..great start indeed💥
@chandradithyak.g460
@chandradithyak.g460 2 жыл бұрын
Amazing explanation kunal. Was able to understand each and every step. Please make a video on generate all combinations of well-formed parentheses. I was seeing all videos for that question but was not able to understand it
@robin5862
@robin5862 Жыл бұрын
Absolutely loved your dsa playlist, i have been watching since start. Also we make dev initiative is super helpful. After completing your dsa course i am going to study web dev from we make dev. But some topics of dsa you have still not covered, please complete the dsa playlist soon. I really appreciate the good work that you are doing, keep it up.
@MalobikaNandy
@MalobikaNandy Күн бұрын
Absolutely incredible. Watched all the videos and able to understand the process and idea behind. Thanks a lot!
@manishkasera8584
@manishkasera8584 2 жыл бұрын
Dil se khushi hota hai yr aisa video dekh ke and most important topic smjh ke 🔥🔥🔥🔥🔥🔥🔥
@sukanyapawal6376
@sukanyapawal6376 Жыл бұрын
Best explanation. I never knew what backtracking was, but after watching this video I understood the concept in depth. Thankyou Kunal Bhaiyya!
@user-ge8cg8yy6n
@user-ge8cg8yy6n Жыл бұрын
After watching your video's I've got next level of confidence to solve recursion problems.. You are a very good at simplifying concepts.. Thank you
@ankurtiwari9621
@ankurtiwari9621 8 ай бұрын
Loved this playlist..Making hard things look so easy..highly recommend this course to any software developer , if wanted to learn the concept ( irrespective of the language). Kudos !!
@fxtstudios3285
@fxtstudios3285 Жыл бұрын
Your codes are masterpiece , the more one understand them , the more they like it. Still , wisest are they who know that they don't know.
@kanakkanak1520
@kanakkanak1520 2 жыл бұрын
Thank you for making the recursion concept so easy😊 also, for breaking the myth 21:52, I believed in it for the longest time
@subham54321
@subham54321 2 жыл бұрын
Hi Kunal, your course is THE BEST. please release the video of OOP, when can we expect the OOP video?
@anshulporwal3957
@anshulporwal3957 2 ай бұрын
Just awesome. The best video available for backtracking. Hats off to you Kunal.
@KunalKushwaha
@KunalKushwaha 2 ай бұрын
Glad you liked it!
@tillapudisudhakar7499
@tillapudisudhakar7499 Ай бұрын
Sir, I can't believe how much i learned from your videos, Thank you so much for providing all these stuff for free. we vow you a lot.Thank you Kunal Sir.
@devjeff3192
@devjeff3192 2 жыл бұрын
Thank you soooo much, your explainations are incredible. Thank you, brother !!!!
@milan_20
@milan_20 9 ай бұрын
There's nothing simple concept explanation like this... Ever seen💯👌🏻
@aInvincibleProgramer789
@aInvincibleProgramer789 Жыл бұрын
Mene apka playlist dekh krr phla question khud se bnaya aur baki ke bhi bna dala thanxx bhaiya 😍❤❤
@udayansingh6788
@udayansingh6788 2 жыл бұрын
Man this tutorial was sooooooo good!!!!! Before starting this series I never felt confident in recursion but today I was able to solve problems on my own. I can see that my problem solving skills have really improved. Thank you so much Kunal!! ❤❤
@manojgollapelli9856
@manojgollapelli9856 2 жыл бұрын
i cant express my thanks to this guy.. what a video.. 💥🔥
@shofiyabootwala2094
@shofiyabootwala2094 2 жыл бұрын
You not only explained the concept of backtracking but also explained why do we actually need it. Splendid explanation as always. Thank You!
@preciso5831
@preciso5831 2 жыл бұрын
Best backtracking and recrusion explanation video all over the internet for beginners.
@anandj3616
@anandj3616 10 ай бұрын
literally solved all the questions before his explanation because of his previous recursion videos knowledge . kunal your recursion playlist is 🔥🔥🔥
@amithhd
@amithhd 9 ай бұрын
Hp wawawa 👌
@indukumari193
@indukumari193 2 жыл бұрын
Amazing explanation of backtracking kunal thanks a lot🙏 😊😊.
@cdp1191
@cdp1191 Жыл бұрын
This is the best course on KZfaq thanks Kunal Kushwah
@haripriyaveluchamy9449
@haripriyaveluchamy9449 Жыл бұрын
kunal... when i saw the last problem solution without my knowledge i clapped and shouted ....... u r great ...
@saitejakatta1156
@saitejakatta1156 Жыл бұрын
I didn't hear about back tracking before and for me now it is easy but when I have seen the comments I understand that Kunal had made it easy .What a way of explanation EXCELLENT Teaching Skills you have and thanks you for making the Playlist
@KunalKushwaha
@KunalKushwaha Жыл бұрын
Thanks for sharing
@anushkjain4528
@anushkjain4528 2 ай бұрын
That was awesome @kunal!!!!
@cindrasenareddy1929
@cindrasenareddy1929 Жыл бұрын
legendary as always
@Ayush-bk3rv
@Ayush-bk3rv 2 жыл бұрын
I dont even know these topics as im not from a cs background but i have faith in this guy, might not land a FANG company but definitely learning something new everyday
@rsambas
@rsambas 2 жыл бұрын
Awesome videos👏👏👏. Please post videos on binary tree, graph and dynamic programming. Thank you!
@arjunmangali2904
@arjunmangali2904 11 ай бұрын
Kunal First of all thank you so much. I love the way you teach, you know how to teach what to teach. Amazing kunal, finally i feel i doing right teacher, And big thanks to you, your java videos helped me in cracking 10+LPA job as a fresher, thanks a lot @kunal
@mukuljain7845
@mukuljain7845 2 жыл бұрын
Amazing explanation of Backtracking, thanks man!!!!
@aarya3605
@aarya3605 2 жыл бұрын
The way u explain is next level seriously 💯
@akshaykumar-wd8jc
@akshaykumar-wd8jc 2 жыл бұрын
Woww great content man love ur course
@v19993
@v19993 2 жыл бұрын
Seriously bro ,you are incredible.
@azmat6428
@azmat6428 Жыл бұрын
At some points when I see you, I kinda get laugh. Anyway I love your teaching bro. Thanks a lot man. You are helping every person who are need of learning DSA and JAVA.
@100Days-nt6cx
@100Days-nt6cx 5 ай бұрын
Such a nice video. You have created interest of tech inside me. Loved watching your video.
@sauravkalita2006
@sauravkalita2006 Жыл бұрын
I must say Kunal, I was having a hard time understanding backtracking and other concepts in my college years as the teacher overcomplicated things when they were teaching these concepts. But the way you taught in these videos with such an innovative way, I can understand it so easily and I finally can feel confident whenever I tackle with such problems. Thank you Kunal and a Happy Teacher's Day
@nousheen05
@nousheen05 2 ай бұрын
ngl recursion has become my favourite after this playlist.
@satyampandey3136
@satyampandey3136 14 күн бұрын
Thank you so much Kunal for these wonderful explanations. Requesting you to please provide the dynamic programming lecture link that you discuss in your lectures.
@rahulkumar-xu9rv
@rahulkumar-xu9rv Ай бұрын
you are a genius kunal .
@user-bd7fo1wv9b
@user-bd7fo1wv9b 5 ай бұрын
Dear Kunal, We have no words to thank you! You litertly save us in our degree. Are there videos about dynamic programming already?
@hargunsingh8800
@hargunsingh8800 Жыл бұрын
Hi Kunal, Your recursion playlist on KZfaq has been a game-changer for me! I have learned so much and have been able to apply the concepts in my coding projects. I would love to see a new lecture series on dynamic programming. I know it's a challenging topic, but I trust your teaching style and explanations to make it more approachable. Keep up the great work!.
@AkashDas-ze2co
@AkashDas-ze2co 16 күн бұрын
In video also we are learning recursion...like some doubt arises go to the previous videos and again in the previous videos doubt arises go to the another previous video.....at the end if we will reach the base condition which we will have all answers and then we will return to this video with all doubts cleared. 😂😂 BTW great effort and way of explaining the problems is really appreciable...hats of to you sir🙏🙏 ❤❤
@shrutikanda
@shrutikanda 3 ай бұрын
Thank you much Kunal for making this course . Just wondering when are you planning for Dynamic Programming and Graph series? Thanks once again .
@aakashmalhotra3157
@aakashmalhotra3157 2 жыл бұрын
Even a cpp student also watching these videos because such awesome content is not available for cpp.
@mohamedabdulla8097
@mohamedabdulla8097 2 жыл бұрын
Excellent explaination about Backtracking 🔥
@logic2789
@logic2789 2 жыл бұрын
watched your entire recursion playlist I must say, you just made recursion very easy(atleast for me). Permutations, subsequences you made them easy for me, I was able to solve many of its applications with slight variations. Thank you Kunal for making this amazing playlist you always make complicated topics easy for us.
@divyasaivaddhi2729
@divyasaivaddhi2729 Жыл бұрын
thank you for this amazing playlist 👍👌
@rockya007
@rockya007 Жыл бұрын
kind of satisfaction after learning all this stuff is priceless
@exe.m1dn1ght
@exe.m1dn1ght 3 ай бұрын
God bless your kind heart Kunal
@pratyakshtrivedi6694
@pratyakshtrivedi6694 Ай бұрын
BEAUTIFUL EXPLANATION MAN..........HATS OFF....🔥🔥🔥
@swatibohidar1678
@swatibohidar1678 8 күн бұрын
Best Backtracking I have ever seen and understood
@shivamkumarchaudhary2679
@shivamkumarchaudhary2679 Жыл бұрын
I really enjoyed this lecture like binary search
@aishikpal7139
@aishikpal7139 2 жыл бұрын
Eagerly waiting for the video on DP. Please upload it soon. 🙏🙏
@subhankarkanrar9494
@subhankarkanrar9494 5 ай бұрын
I am enjoying your full course. I have one request for you --> Please complete it with DP.
@lokesh3526
@lokesh3526 2 жыл бұрын
keep up the good work
@anmolsharma9539
@anmolsharma9539 2 жыл бұрын
Hi Kunal thanks for the video really appreciated the hard work you put in it. In the last question I stuck at a very interesting part I was trying to add the path in the arraylist by passing it in the arguments of the function. I realized even though the list is not static same reference of the path is stored in the list again and again . It's obvious since all the array is pointing to the same reference . Then I try to create a new array every time by new keyword and then System.arrayCopy but still the same array reference is there printing the last value n number of times. Did you know any way in which I can store it in the arraylist while preserving all the values . I tried to look it in different website will add in the thread if I found it . Happy Learning : )
@aakashyadav9117
@aakashyadav9117 Жыл бұрын
you explained backtracking so easily bro 🙌
@yashtibra3684
@yashtibra3684 2 жыл бұрын
Simply Amazing.
@bhavyabansal1143
@bhavyabansal1143 2 жыл бұрын
Thanks again for amazing videos, wanted to clarify one thing. The answer for paths when obstacle is there, isn't that wrong? Lets say I have 1 x 4 array and there is obstacle at 0,3 then answer shall be 0 but the code will print 1.
@PiyushYadav-jn7se
@PiyushYadav-jn7se 3 ай бұрын
you are amazing kunal sir
@tarunpahuja3443
@tarunpahuja3443 2 жыл бұрын
nice systematic approach. DO you have DP lectures ?
@RAHULRAJ-et9se
@RAHULRAJ-et9se 11 ай бұрын
this man is insane ❤‍🔥
@princekoshti7245
@princekoshti7245 Жыл бұрын
I always wanted to be taught like this :-) Thanks bhaiya
@kushalsarda3435
@kushalsarda3435 2 жыл бұрын
Pleaseeee make video on DP plzzzz, ur teaching is the perfect way, we have forget to memorize... just understand and apply thankss a lot!!
@rishabhrawat8197
@rishabhrawat8197 2 жыл бұрын
kunal you explained it very well and ah u made my life easy hats off
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Thank You
@260_arnabkumarbaishya9
@260_arnabkumarbaishya9 2 жыл бұрын
This man shaping my future :)
@dineshmadduru7043
@dineshmadduru7043 Ай бұрын
Thanks for the video :) btw your rap is cool 😅
@girirajtomar519
@girirajtomar519 2 жыл бұрын
Best Backtracking lecture bhai !!
@deekshithpranav1619
@deekshithpranav1619 2 жыл бұрын
Hey bro, just wanted to let you know that I was able to do some problems in the video without actually watching it. Thanks to your previous videos in the playlist.
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Great to hear!
@youwillyoucan
@youwillyoucan 2 жыл бұрын
i have learned a lot from your videos, will you please update us when will you end this course. please give us some idea bro it really helps us to set other goals. again thanks for this course👌✌
@Shourya_performs
@Shourya_performs 2 жыл бұрын
Now we are readyyyyyyyyy for DP. Eagerly waiting
@anindabarua6233
@anindabarua6233 11 ай бұрын
Great Explanation 😊
@chandrus5847
@chandrus5847 3 ай бұрын
best best best the best Explanation in the world
@prasadshinde192
@prasadshinde192 Жыл бұрын
hats off to you Kunal
@antosha2224
@antosha2224 Жыл бұрын
Thank you do much!
@nishu0766
@nishu0766 4 күн бұрын
please upload all the remaining topics of this DSA playlist as soon as possible
@dibbyarupdutta3525
@dibbyarupdutta3525 2 жыл бұрын
There's no match for the way you explain things Kunal.
N-Queens, N-Knights, Sudoku Solver (LeetCode) - Backtracking Questions
1:19:26
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,5 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 23 МЛН
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 41 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 13 МЛН
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 424 М.
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
Recursion - Permutations (Theory + Code + Tips)
25:22
Kunal Kushwaha
Рет қаралды 145 М.
How to Start Leetcode (as a beginner)
8:45
Ashish Pratap Singh
Рет қаралды 795 М.
Introduction to Recursion - Learn In The Best Way
1:55:49
Kunal Kushwaha
Рет қаралды 892 М.
Merge Sort Using Recursion (Theory + Complexity + Code)
49:47
Kunal Kushwaha
Рет қаралды 219 М.
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 23 МЛН