The Backtracking Blueprint: The Legendary 3 Keys To Backtracking Algorithms

  Переглядів 465,858

Back To Back SWE

Back To Back SWE

День тому

0/1 Code & Problem Statement @ backtobackswe.com/platform/co...
Free Mini DSA Course - backtobackswe.com
Try Our Full Platform: backtobackswe.com
📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions
An overview of how to solve problems using backtracking.
- We make choices, we constrain how our recursion advances and we converge toward a goal.
- It can be used in multiple problems:
N Queens
Graph coloring
Sum of Subset
0/1 Knapsack
- It is also an important concept for Artificial Intelligence.
N Queens Video: • The N Queens Problem u...
0/1 Knapsack Video: • The 0/1 Knapsack Probl...
++++++++++++++++++++++++++++++++++++++++++++++++++

КОМЕНТАРІ: 359
@BackToBackSWE
@BackToBackSWE 5 років тому
Table of Contents: Beginning The Backtracking Discussion 0:00 - 1:08 The 3 Keys To Backtracking 1:08 - 2:40 The Choice: Defining Our Decision Space 2:40 - 5:50 The Constraints: Directing Our Recursion 5:50 - 7:42 Our Goal: When Recursion Bottoms Out 7:42 - 9:22 Lesson Summary 9:22 - 10:52 How Do We Know When We Can Use Backtracking 10:52 - 12:07 Wrap Up 12:07 - 13:25 I don't like the word "blueprint" for these problems. There are patterns, I agree. But memorization of code snippets and patterns will rob you of true learning. You won't learn how to think on your own. Don't learn templates, know what is going on deeply. The code for the Sudoku solver problem is in the description.
@BackToBackSWE
@BackToBackSWE 5 років тому
@shaurya pratap singh Depends. Like...this is hard to answer. What I focus on is Big N companies and these kinds of questions. For any other job in tech I really am not sure...it depends what you want to do. But yes, if you can do these then it basically proves you have the intellectual prowess to learn any tools used on the job. Much much easier to go from being a computer scientist to being a software engineer, than to go from web development to being a computer scientist.
@BackToBackSWE
@BackToBackSWE 5 років тому
@shaurya pratap singh sure
@surbhigupta3403
@surbhigupta3403 4 роки тому
A video on Dynamic programming blueprint as well
@bberger7858
@bberger7858 4 роки тому
There is no code in the description
@smritisrivastava4036
@smritisrivastava4036 3 роки тому
I can't find the link to your code
@colloidalsilver177
@colloidalsilver177 5 років тому
bro can you all make every video from now on like this?..... i love the graphics .... putting the code on the screen is major key
@BackToBackSWE
@BackToBackSWE 5 років тому
I wish I could. This took 7 hours. I...I really wish I could make everything top notch and it is annoying...but yeah I will continue to mix things up :)
@airysm
@airysm 5 років тому
“Our for loop is for exploration in the stack frame” thanks for phrasing it like that it makes a lot of sense to me now
@BackToBackSWE
@BackToBackSWE 5 років тому
yeah, I knew people would like that. I had that sentence circulating in my brain before I did this video (I had no script)...so I made sure I said it.
@sharmynkayani4962
@sharmynkayani4962 4 роки тому
I am so happy I found this channel! Dynamic Programming scares me but I am determined to combat that scare and these videos will help for sure. Thanks heaps :D
@BackToBackSWE
@BackToBackSWE 4 роки тому
nice
@extremelyhappysimmer
@extremelyhappysimmer 2 роки тому
i love that your torso just blends into the background with the white shirt and you are just a benevolent set of floating body parts teaching us how to not fail finals tomorrow.
@NganVoooo
@NganVoooo 5 років тому
Thanks for making these videos! Your videos are always really engaging and really well-thought out. I hope you keep going with this channel; it's really invaluable to the SWE community. I feel this one particularly was really great because it really helps with building the mental model needed to approaching backtracking. You generally do a great job at this in your other videos, but I'm really glad you took the time to dedicate a whole video on the general approach. It's always great to be able to solve problems, but even more important to build the right intuition.
@BackToBackSWE
@BackToBackSWE 5 років тому
sure, I try my best....most of the time :)
@krishanbhansalee8369
@krishanbhansalee8369 5 років тому
Hi Ben, You are really doing great job. The way you explain the problem, make it very easy to understand and sink.It not only help us to understand the thought process but also bringing interest in to solving this type of problems. Your video's are the best among all the you tube videos which i have seen so far. I really appreciate you and your friend's effort for bringing out such a awesome contents.
@BackToBackSWE
@BackToBackSWE 5 років тому
It's just me now, but yeah...thanks :)
@AzharulIslamParvez
@AzharulIslamParvez 4 роки тому
I absolutely love your videos. Your explanations are just spot on. Your videos are the reason why I feel like I am getting a hold of difficult topics like recursion, DP, and backtracking. Great work dude!
@BackToBackSWE
@BackToBackSWE 4 роки тому
Nice
@animeshjaiswal3039
@animeshjaiswal3039 4 роки тому
Sometimes we see things that are so splendid that we are out of words to express.And right now I am. Thanks for this awesome video.
@BackToBackSWE
@BackToBackSWE 4 роки тому
haha nice, thanks
@vatsalhirpara5869
@vatsalhirpara5869 4 роки тому
I love your teaching approach, not directly jumping to solutions but showing entire thought process.
@BackToBackSWE
@BackToBackSWE 4 роки тому
thanks
@vrushalidesai1807
@vrushalidesai1807 3 роки тому
This has been SO helpful. Thank you thank you thank you for breaking it down in a way that makes it super easy to understand!
@maithreyiprabhu2853
@maithreyiprabhu2853 3 роки тому
Thank you so much for this. Looking forward to seeing more videos regularly. I don't know why I didn't come across this channel sooner.
@BackToBackSWE
@BackToBackSWE 3 роки тому
welcome
@EsotericArnold
@EsotericArnold 3 роки тому
This is hands down the best description I've heard on helper method recursion/backtracking.
@BackToBackSWE
@BackToBackSWE 3 роки тому
thx
@TacklessNebula3
@TacklessNebula3 3 роки тому
This was great. First time in your channel mate, and you have already earned another subscriber... Keep on making such videos, that'll help us looking at such algorithms from another perspective, and help you learn more as you make them! Thanks!
@gfdtfgf3278
@gfdtfgf3278 Рік тому
V TV FC hmm
@LombaxPieboy16
@LombaxPieboy16 3 роки тому
This video is great! Very well explained, and I loved the editing :) Awesome job dude!
@luisasanchez9267
@luisasanchez9267 2 роки тому
Man, your videos are really helpful. The way you explain it, your passion and your attitude is pure gold.
@BackToBackSWE
@BackToBackSWE 2 роки тому
Thanks! you could always try the 5 day free mini course for some awesome content - backtobackswe.com/
@MohakNarang07
@MohakNarang07 Рік тому
I watched this video about a month ago when I was trying to get my head around backtracking but couldn't understand much. After solving a bunch of problems on Leet Code over the past month, I'm watching this video again, and surprisingly, it makes a lot more sense now xD Thanks a lot!
@BackToBackSWE
@BackToBackSWE Рік тому
Glad it was helpful! 😄 Also check out our FREE DSA Interview Prep Mini-Course - backtobackswe.com/ 🎉
@nitinsrivastava1473
@nitinsrivastava1473 4 роки тому
doing great job man!.... It's just my second video that i watched..... I really have respect for you .
@BackToBackSWE
@BackToBackSWE 4 роки тому
nice thanks
@youtv99
@youtv99 5 років тому
The content you are creating is valuable. Educational and entertaining and delivered a way that makes it stick in memory. The approach to the topics makes it easy to grasp and remember the base concepts and tool sets which gives the confidence to handle any interview question. Being able to quickly classify the type of problem and the tool set, algorithm and data structure to address it makes all the difference. If you could somehow show how to implement the code on white board would be cool. Also, some sample interview role playing with be great.
@BackToBackSWE
@BackToBackSWE 5 років тому
Yeah, I have a video coming out in a little that will address the future of this project.
@hetalrachh5665
@hetalrachh5665 4 роки тому
This now my favorite channel for Data structures. Thank you for such amazing videos :)
@BackToBackSWE
@BackToBackSWE 4 роки тому
sure
@vishalkarki9489
@vishalkarki9489 3 роки тому
try mycodeschool channel
@antbotboy
@antbotboy 5 років тому
Wow, this video really opened a new way of looking at the problems. Thank you and keep making videos!
@BackToBackSWE
@BackToBackSWE 5 років тому
sure
@priyaljhaveri9320
@priyaljhaveri9320 5 місяців тому
This is such a simplified approach to backtracking! Hope you start making videos again!
@kuralamuthankathirvelan
@kuralamuthankathirvelan 4 роки тому
These three keys are very useful inorder to find a pattern to solve any backtracking the problem !...Thanks a Ton bro !
@BackToBackSWE
@BackToBackSWE 4 роки тому
sure
@ChaosB7ack
@ChaosB7ack Рік тому
This mental model was great to learn! Thank you for the quality.
@tommyshelby2020
@tommyshelby2020 4 роки тому
Really awesome videos, watched most of your DP's, annoyed my friends sharing them all the links. Hope you & your channel achieve greater success!
@BackToBackSWE
@BackToBackSWE 4 роки тому
thanks for sharing us, best thing anyone can do to help. And thanks, we are working on it.
@copindeanalex
@copindeanalex 4 роки тому
Thank you so much, really clarified my doubts about the usefulness of backtracking. My university teacher should be learning from you how to explain algorithms.
@BackToBackSWE
@BackToBackSWE 4 роки тому
nice
@guruvigneshnagaraj8501
@guruvigneshnagaraj8501 3 роки тому
Thank you for providing a template for the backtracking problems. As an aspiring software engineer, this helps a lot!
@BackToBackSWE
@BackToBackSWE 3 роки тому
great to hear.
@yizhangchen7409
@yizhangchen7409 5 років тому
I love the clarity of your video! Thank you very much!
@BackToBackSWE
@BackToBackSWE 5 років тому
sure
@christianbejarano6263
@christianbejarano6263 3 роки тому
Best explanation I've found so far. Thank you man
@gabrielacarrillo2942
@gabrielacarrillo2942 4 роки тому
Hey just wanted to let you know that this video is INCREDIBLY helpful. I had an onsite interview with Google and this legit helped me solve 3 out of the 5 questions they asked me. Without ever seeing the problem before, I used this methodology and was able to solve the problems. HUGE thanks
@BackToBackSWE
@BackToBackSWE 4 роки тому
sure
@bethlehemdereselegn7900
@bethlehemdereselegn7900 3 роки тому
i didn't knw abt backtracking at all and zis helped me on understanding string permutation more. Soo thank you.
@BackToBackSWE
@BackToBackSWE 3 роки тому
sure
@maheshbanjan856
@maheshbanjan856 4 роки тому
Your explanation is seriously good. Keep up the videos. Would love to see your channel grow
@BackToBackSWE
@BackToBackSWE 4 роки тому
thanks, me too
@deepambanerjee3716
@deepambanerjee3716 3 роки тому
This is how you become humble and knowledgable at the same time
@BackToBackSWE
@BackToBackSWE 3 роки тому
haha nice
@jacobsummerz6
@jacobsummerz6 Рік тому
This guy is helping us learn while also practicing to become a weather man
@chaplinhuang460
@chaplinhuang460 Рік тому
I love you. Thank you so much. The last minute of reflection is all I need for the day. Thank you, thank you, thank you.
@BackToBackSWE
@BackToBackSWE Рік тому
Happy Holidays! Really glad to help 🎉 Do you know about the 5 Day Free Mini Course? Check it out here - backtobackswe.com/
@bokams3385
@bokams3385 3 роки тому
I like ur way of thinking and asking questions during solve any problem
@LTF-uj1yc
@LTF-uj1yc 3 роки тому
This consolidated my understanding of backtracking, thank you.
@BackToBackSWE
@BackToBackSWE 3 роки тому
great.
@nilanjanmukherjee4219
@nilanjanmukherjee4219 4 роки тому
Beautiful explanation. Almost feels criminal that it isn't a paid course or content..I struggled for sometime on most DP tutorials mostly because they were focusing on what to do and not why.
@BackToBackSWE
@BackToBackSWE 4 роки тому
hahah, I do have a paid course that I'm growing right now. But yeah, all the videos here are the property of the internet and mankind now.
@Code4You1
@Code4You1 Рік тому
2:53 I love that we all think as a first about a double for loop for each coding question :))
@asgm1382
@asgm1382 Рік тому
Excellent video! Thank you for sharing. I love your explanation towards the end and could not agree more.
@BackToBackSWE
@BackToBackSWE Рік тому
Glad you enjoyed it!
@jocalvo
@jocalvo 2 роки тому
That was probably the best explanation of backtracking out there . Thanks a lot!
@BackToBackSWE
@BackToBackSWE Рік тому
Thank you, glad you liked it 😀 Do check out backtobackswe.com/platform/content and please recommend us to your family and friends 😀
@giteshkhanna2633
@giteshkhanna2633 2 роки тому
It's a really good brief! Thanks for the video !
@smmehrab
@smmehrab 3 роки тому
Appreciate your work, man! Thank you!
@BackToBackSWE
@BackToBackSWE 3 роки тому
sure
@Beeliswahili
@Beeliswahili 4 роки тому
Very nicely done. One request. When you screen reference the previous related videos, could you add a link in your intro text along with the other excellent links you provide...I'm reviewing them all in sequence to help me work through these problems and leetcode questions. Your explanations provide great insights and I REALLY appreciate all of the effort you have placed in these discussions. Thank you!
@BackToBackSWE
@BackToBackSWE 4 роки тому
yeah sure
@BaishaliGhosh13
@BaishaliGhosh13 4 роки тому
Thank you once again. This was a cool way to think about backtracking problems. I personally feel some of the dp and backtracking questions draw a lot from mathematical induction and the ability to be able to express a question recursively like you said. I will practice a couple and see if I have a better hang of these problems. Thanks a ton for doing such a great job. Love your videos.
@BackToBackSWE
@BackToBackSWE 4 роки тому
sure
@sakhriwissal5607
@sakhriwissal5607 Рік тому
you're just amazing I love how you went for it! keep it up !!!!! your channel is a treasure
@BackToBackSWE
@BackToBackSWE Рік тому
Means a lot
@dosatross
@dosatross 5 років тому
you're a legend mate..better explanations than 95% of my uni profs
@BackToBackSWE
@BackToBackSWE 5 років тому
Give me 1-3 years...the legend will continue.
@RiteshSingh-lo9cn
@RiteshSingh-lo9cn 4 роки тому
first time on this channel and subscribed it... Awesome way of teaching... Request to everyone: Share this video more nd moe
@BackToBackSWE
@BackToBackSWE 4 роки тому
ha thanks, we have a course where I'm posting more videos like this, check it out
@tushargoyal6704
@tushargoyal6704 4 роки тому
this video is one of the best i have ever seen on teaching skills.
@BackToBackSWE
@BackToBackSWE 4 роки тому
thanks
@tushargoyal3804
@tushargoyal3804 3 роки тому
@@BackToBackSWE I today got placed at Wells Fargo and I am here to say thank you to you. From you, I have learned the most important technique that is how to approach a problem. Thanks again and keep sharing your knowledge
@patrickmayer9218
@patrickmayer9218 5 місяців тому
*3 Keys: Choice, constraints, and goal. *Choice - Think about the choice you are making at every step *Constraints - What rules the choice must follow *Goal - What base case needs to be reached? *Backtracking is essentially just recursing on your decision if you screw up. *Look for words like "generate all" and "compute all". That will indicate backtracking is a good idea. Thanks for the video!
@BackToBackSWE
@BackToBackSWE 4 місяці тому
Happy Holidays 🎉 Thank you for your kind words! We'd love to offer you a 40% Off our exclusive lifetime membership just use the code CHEER40 - backtobackswe.com/checkout?plan=lifetime-legacy&discount_code=CHEER40
@josephwong2832
@josephwong2832 4 роки тому
Finally someone who could explain this to me in a way I actually understood...
@BackToBackSWE
@BackToBackSWE 4 роки тому
ye
@Anand-wi4yb
@Anand-wi4yb 5 років тому
0 Dislikes tells that how much people like the way you explain.
@BackToBackSWE
@BackToBackSWE 5 років тому
Aw, thanks haha
@shnerdz
@shnerdz 5 років тому
Hey man, recently found your channel and I absolutely love your teaching style. The quality of the videos have been getting better, too. I've been trying to practice more leetcode for interviews and whatnot, but since I've only recently started, I'm struggling quite a bit. When you see a problem that you do not understand or just have no idea how to solve at all, at what point do you give up and look at the answer?
@BackToBackSWE
@BackToBackSWE 5 років тому
Thanks, thanks, and it depends greatly. If I know the problem class I'll keep going. But if I am just 100% stumped for 20 minutes, with no leads to start (which that still happens), only then do I look at the answer. And then there are times I look at the answers very quickly, just to get a mass of questions in. Ummm...yeah this really depends.
@pradyooo
@pradyooo 3 роки тому
Love the effects in the videos, helps us understand
@BackToBackSWE
@BackToBackSWE 3 роки тому
great
@BharCode09
@BharCode09 4 роки тому
You are not teaching, you healing. The way you approach and progress towards the solution, putting yourself in our shoes like "how easy/difficult it would be to understand what I'm saying". As if you totally understand the situation we are in. I bow for that empathy! 👐🙏
@BackToBackSWE
@BackToBackSWE 4 роки тому
thanks haha
@garvjain1450
@garvjain1450 3 роки тому
Not the hero we deserve, but the hero we need...
@BackToBackSWE
@BackToBackSWE 3 роки тому
lol thx
@axelalvarenga4477
@axelalvarenga4477 7 місяців тому
Thanks for the video. Really helpful for my efforts to pass an algorithms and data structures class in undergrad CS.
@ericli5549
@ericli5549 2 роки тому
Thank you for explaining this so well. Crystal clear.
@BackToBackSWE
@BackToBackSWE Рік тому
Thank you, glad you liked it 😀 Do check out backtobackswe.com/platform/content and please recommend us to your family and friends 😀
@user-fd8gy7di6o
@user-fd8gy7di6o Місяць тому
Thank you dear man for your clear explanations! Hello from Russia!
@hope4293
@hope4293 4 роки тому
Thank you! All your explanation help my exam!
@BackToBackSWE
@BackToBackSWE 4 роки тому
sure
@kevinpatel5106
@kevinpatel5106 2 роки тому
Love your videos man, you're a real one!
@tammyhi
@tammyhi Рік тому
Thank you for the video! This was really helpful and made it easier for me to understand Backtracking!
@optimizedpran1247
@optimizedpran1247 3 роки тому
THIS MAN IS A LITERAL LEGEND. May you be blessed with glory in all three worlds.
@BackToBackSWE
@BackToBackSWE 3 роки тому
I am normal
@optimizedpran1247
@optimizedpran1247 3 роки тому
@@BackToBackSWE hahahaha ik ik. honestly thanks for giving back to the community.
@bobbyd1658
@bobbyd1658 2 роки тому
Awesome thank you!! Greatly explained generalization.
@brandonnguyenlam
@brandonnguyenlam Рік тому
Absolutely stellar video and explanation of backtracking. Thank you.
@BackToBackSWE
@BackToBackSWE Рік тому
Happy Holidays! Really glad to help 🎉 Do you know about the 5 Day Free Mini Course? Check it out here - backtobackswe.com/
@kbarot3886
@kbarot3886 4 роки тому
Make the n-queen problem again please. U really helped me understand dynamic programming, thank you so much!
@BackToBackSWE
@BackToBackSWE 4 роки тому
Yeah I think I can explain it better today vs 1 year ago
@sophiehall38
@sophiehall38 4 роки тому
I don't know whether I told you this before, but your video are reallllllllllly great!
@BackToBackSWE
@BackToBackSWE 4 роки тому
haha thanks
@JiaTanchun
@JiaTanchun 10 місяців тому
I like your content. I appreciate your enthusiasm from your voice and smile.
@BackToBackSWE
@BackToBackSWE 10 місяців тому
Thank you! Please enjoy a special code from us - backtobackswe.com/checkout?plan=lifetime-legacy&discount_code=IneluctableConcomitant 🎉
@hornsbeef
@hornsbeef 3 місяці тому
You good sir are my hero!
@hackerandpainter
@hackerandpainter 3 роки тому
Lol "i don't think that video is that good..." nah YOU ARE AMAZING MAN IF I PASS MY INTERVIEW ON FRIDAY A LARGE CREDIT WILL BE TO YOU. Thank you! ❤️
@vipulkrishna19
@vipulkrishna19 4 роки тому
Loved your teaching style.. 😍 from india
@BackToBackSWE
@BackToBackSWE 4 роки тому
wassup
@mvmcali6900
@mvmcali6900 3 роки тому
"I kind of just went for it ..and talked a lot " . That's honestly funny.. nice videos my friend
@BackToBackSWE
@BackToBackSWE 3 роки тому
yeah lol
@FitnessChaos
@FitnessChaos 2 роки тому
Nice breakdown generally on how to think about a solving problem.
@sophiaatn5339
@sophiaatn5339 3 роки тому
This was really helpful, thank you very much
@karthiks9426
@karthiks9426 2 роки тому
When UKposts suggested this video for Backtracking, I was wondering why Lewis Hamilton is explaining Backtracking 🤔 😳. But you certainly didn't disappoint. Thanks for the great explanation 👍
@BackToBackSWE
@BackToBackSWE 2 роки тому
haha! thanks. Hoping to see Lewis back on the f1 track
@BackToBackSWE
@BackToBackSWE 2 роки тому
Subscribe to our DSA course with a flat 30% discount for some amazing content b2bswe.co/3HhvIlV
@studgaming6160
@studgaming6160 4 роки тому
You are so accurate on logic !!
@BackToBackSWE
@BackToBackSWE 4 роки тому
thx
@ANoleJoke
@ANoleJoke 4 роки тому
13:13 Gold.
@BackToBackSWE
@BackToBackSWE 4 роки тому
👀👀👀
@shubhampasari7123
@shubhampasari7123 4 роки тому
You have remarkable editing skills!
@BackToBackSWE
@BackToBackSWE 4 роки тому
thanks
@NadaMedhatIbrahim
@NadaMedhatIbrahim 5 років тому
Thank you A LOT!
@BackToBackSWE
@BackToBackSWE 5 років тому
sure
@kunalsangtiani6534
@kunalsangtiani6534 3 роки тому
You are a greatttttt teacher , Thankyou so much
@kevinpatel5106
@kevinpatel5106 2 роки тому
appreciate all that you do!
@ziyuechen12
@ziyuechen12 5 років тому
Thanks for the awesome video! You got a subscriber :D
@BackToBackSWE
@BackToBackSWE 5 років тому
nice, score! lol
@adrianbrandheini319
@adrianbrandheini319 8 місяців тому
GREAT VIDEO!
@sase1017
@sase1017 3 роки тому
Thought process, superb
@adityajain-fn6ne
@adityajain-fn6ne 3 роки тому
great explaination , really really helpful , thanks a lot!
@BackToBackSWE
@BackToBackSWE 3 роки тому
sure
@niharikapatil902
@niharikapatil902 3 роки тому
THIS VIDEO IS EVERYTHING
@BackToBackSWE
@BackToBackSWE 3 роки тому
o k
@peterlin2352
@peterlin2352 4 роки тому
Well said at the end!
@BackToBackSWE
@BackToBackSWE 4 роки тому
What did I say? Long time ago
@peterlin2352
@peterlin2352 4 роки тому
Back To Back SWE Your determination to save those people suffer from the tech interviews!
@Respect_Mah_Authoritah_
@Respect_Mah_Authoritah_ 3 роки тому
When you “reset” the choice with board[row][col]=EMPTY_ENTRY, shouldn’t this line be under an else block inside the for loop? Currently you have it outside the for.
@sunnyrawat931
@sunnyrawat931 2 роки тому
it solved many problems thanks
@BladeAurora
@BladeAurora 4 роки тому
Thanks man, this help me solve leetcode 79 word search
@BackToBackSWE
@BackToBackSWE 4 роки тому
excellent
@ricardovaltierra8858
@ricardovaltierra8858 3 роки тому
Thank you very much really. All the best
@vasukhungar2517
@vasukhungar2517 4 роки тому
Hey Ben , your explanation is awesome, can u please explain optimal game strategy question. From recursion to DP.
@BackToBackSWE
@BackToBackSWE 4 роки тому
yeah, I may throw that into this site: twitter.com/thebigoguide
@moody_moolga
@moody_moolga 4 роки тому
You are real! That's all I can say! stay real man!!!
@BackToBackSWE
@BackToBackSWE 4 роки тому
thx.
@ll-sz9fl
@ll-sz9fl 3 роки тому
You could solve the Sudoku with DP, it would be faster: O(n*m), where n and m are the height and width of the grid.
@BackToBackSWE
@BackToBackSWE 3 роки тому
ok
@YasserSinjab
@YasserSinjab 3 роки тому
you deserve a super LIKE !
@BackToBackSWE
@BackToBackSWE 3 роки тому
thanks
@number3boo
@number3boo 4 роки тому
I really appreciate the videos you make. They're very informative and useful! Thanks :)
@BackToBackSWE
@BackToBackSWE 4 роки тому
sure, hope they help you!
@vigneshwaranr680
@vigneshwaranr680 3 роки тому
Thank you!
@BackToBackSWE
@BackToBackSWE 3 роки тому
sure
@varshamehra8164
@varshamehra8164 4 роки тому
Thanks a lot for your work
@BackToBackSWE
@BackToBackSWE 4 роки тому
sure
@MarcStevens99
@MarcStevens99 4 роки тому
I'm wondering if you could store the decision space in an array or hashset. So each stack frame would only have to loop through a _maximum_ of N choices, but a minimum of 1 choice.
@BackToBackSWE
@BackToBackSWE 4 роки тому
could you elaborate?
@MarcStevens99
@MarcStevens99 4 роки тому
If you're at cell (3,2) - 3rd row, 2nd column. You already know placements (0,2), (1,2), (2,2) and similarly (3,0), (3,1). So you need not search for the decision space that is already allocated to those cells. This optimisation would take up a lot of space though - so it may not be worth it.
@denys3211
@denys3211 4 роки тому
Great video, thank you.
@BackToBackSWE
@BackToBackSWE 4 роки тому
sure
The N Queens Problem using Backtracking/Recursion - Explained
14:29
Back To Back SWE
Переглядів 132 тис.
In 10 Minutes This Room Will Explode!
10:00
MrBeast
Переглядів 33 млн
КАК ГЛОТАЮТ ШПАГУ?😳
00:33
Masomka
Переглядів 998 тис.
Спаси её волосы🙏🏻
00:40
БРУНО
Переглядів 1,6 млн
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Переглядів 449 тис.
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Переглядів 1,1 млн
The 0/1 Knapsack Problem (Demystifying Dynamic Programming)
20:30
Back To Back SWE
Переглядів 198 тис.
N-Queens - Backtracking - Leetcode 51 - Python
17:51
NeetCode
Переглядів 139 тис.
Python Sudoku Solver - Computerphile
10:53
Computerphile
Переглядів 1,1 млн
5 Simple Steps for Solving Dynamic Programming Problems
21:27
Reducible
Переглядів 981 тис.
Как часто вы чистите свой телефон
0:33
KINO KAIF
Переглядів 302 тис.
Как установить Windows 10/11?
0:56
Construct PC
Переглядів 402 тис.
RTX 4070 Super слишком хороша. Меня это бесит
15:22
Рома, Просто Рома
Переглядів 39 тис.