Thank you everyone for watching this video For more leetcode videos check out this playlist: kzbin.info/aero/PLuJfrVx3aQbG1_9k3khnuR0r2RaxExxse
@rohinirenduchintala Жыл бұрын
This is the best backtracking video i have seen. Thank you for saving me another 24 hours of effort into learning this and saving me the rest of my hair on the head from being pulled!
@ComputerBread Жыл бұрын
I am glad it was helpful 😀
@sontredis2579 Жыл бұрын
props to you. This video was the literal ONLY video that helped me understand backtracking and how to apply the concept to ANY problem
@themindsculptor_4 ай бұрын
Me too haha
@samjackson49822 жыл бұрын
"No one asked your opinion" - I laughed hard bro.. You are too mean. 😅🤣
@ricky7389 Жыл бұрын
This is the cleanest backtracking explanation I've ever seen.
@MrBrainsYTАй бұрын
Love this guy! He's funny and knowledgable. No dull movements, very interesting and engaging video. One of the coolest youtuber for Leetcode. I Highly recommend learning from him. :)
@ComputerBreadАй бұрын
Thank you
@vcb007 Жыл бұрын
This is the best video to start of solving a backtracking. Now I can think of optimisations, all the solutions I saw were swapping indexes but didn't seem intuitive although it's understandable. Your video is to the point and intuitive as well. Thanks
@christianjt70184 ай бұрын
The backtracking recipe is pure golden, this is a superb explanation, thank you.
@rameshreddibathuni4 жыл бұрын
The best among all the videos I watched related to this problem !!
@ComputerBread Жыл бұрын
Hey! I am back! Thank you so much for the support! It is truly motivating. I am coming back with more videos, for now I am shifting my focus on JavaScript, but if you want me to cover anything, let me know 😀 My new video about JavaScript Objects: kzbin.info/www/bejne/ine0gmB-asuikNU
@alitaha12009 ай бұрын
Please do more backtracking videos, more leetcode kind of videos. The demand for this is huge.
@ComputerBread9 ай бұрын
@@alitaha1200 Sure, do you have a specific leetcode question in mind, or anything specific you would like me to talk about?
@denysostapenko4452 жыл бұрын
Wow! Your way to present materials is slightly unusual, but man! I've just seen one of the clearest explanations of backtracking and the permutation problem. Tree visualization was super helpful. Definitely got my like. Make more content!
@mrboyban2 жыл бұрын
1:10😂😂😂😂😂 , just made stay on this video. I like that reality check style!Good stuff mate.
@erana41242 жыл бұрын
Great explanation 🙂 "Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime" Here you explained the background knowledge behind the algorithm, and not just explaining the solution flow 🙂that's how teaching should be done Kudos 😀
@samkomo42892 жыл бұрын
Thank you so much! The recipe and the ‘used’ trick really helped me understand
@ashishm2 жыл бұрын
Superb explanation. I was trying to come up with the recipe for backtracking and came across this video. Really helpful.
@TejaDuggirala2 жыл бұрын
Wow.. this is the simplest permutation solution I have seen. Everyone doing that swapping thing which is so confusing. Thanks.
@JMac___8 ай бұрын
i love you man, this made a lot of sense to me and your backtracking building block helped me come to 90% of solution on my own
@ComputerBread8 ай бұрын
@shubhamkamdi66063 жыл бұрын
You made backtracking super easy to understand!
@luckyim65042 жыл бұрын
This is legendary...backtracking receipe....omggg this video is so so so helpful!!
@user-gp8fr1nd3w3 жыл бұрын
I really loved this! Please continue this series.
@CSDex Жыл бұрын
Seemed like you got nervous when you whipped out the code haha, I feel that. Best backtracking video I’ve watched so far. You did a great job of simplifying Back To Back SWE’s videos. Adding that backtracking recipe and using it to work through the problem was great.
@hoangvu-zu6qg6 ай бұрын
Really thanks to you, guy. This video made me more understand about backtracking.
@chandanabhatt82312 жыл бұрын
I really like how provided backtracking recipe .
@richardnorth18813 жыл бұрын
Excellent quality- you have a talent for teaching
@dareTake2 жыл бұрын
Thanks, this was very helpful compared to other solutions that I had encountered. My initial thought process was to use a set and do a difference between the original set and permutation, didn't think of using a simple boolean array.
@rednationsox28023 жыл бұрын
best videos for backtracking ever. Hoping more explaination videos
@fufuto2 жыл бұрын
Why do we need to 'undo the choice' after permutation? We already discovered the permutations and print them. Why should I reverse back to original?
@ip14-2 Жыл бұрын
That backtracking recipe is goated
@stoup87783 ай бұрын
I really like your soln, very clear explanation. I didnt think of using a seperate vector to keep track of used elements either - I tried to used a set when I was implementing on my own and failed miserably haha
@oleksandrshestopal57493 жыл бұрын
The best explanation I have seen so far!!! Please do more videos
@deepakreddy6528 Жыл бұрын
For anyone who wants a more intuitive solution the probem, by simply picking all choices 1 by 1 and also discarding the appended characters to allow for all permutations. class Solution: def permute(self, nums: List[int]) -> List[List[int]]: res = [] visited = [False for _ in range(len(nums))] def dfs(subset): if len(subset) == len(nums): res.append(subset.copy()) return for i in range(len(nums)): if not visited[i]: #Pick the choice visited[i] = True subset.append(nums[i]) dfs(subset) #Undo the choice visited[i] = False subset.pop() dfs([]) return res
@nerdy8644 Жыл бұрын
You kinda sound like jar jar binks
@soanonso2 жыл бұрын
Excellent explanation. Thank you!
@bonginscandinavia10 ай бұрын
Nice explanation for the letter A. I just paused and laughed out loud a while before moving on. 😄
@slizverg23 Жыл бұрын
Dude, thank you sooo much for your solution! I'd almost gave up on this problem but you explanation was realy clean! ))
@ComputerBread Жыл бұрын
I am glad it helped :)
@OverLordOfDa3rdWorld2 жыл бұрын
BRO!!! YOU TAUGHT ME BACKTRACKING HOLY SHHHHHHHHIIIIIIEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET!!!!!!!!!!
@yingxie997425 күн бұрын
Very good explanation ! thanks for sharing !
@harsh9028 Жыл бұрын
Good explanation but would have liked it more if you also explained a full recursive run down of your code.
@Marshlife543 жыл бұрын
Thank you for this great video.
@pranjansana25983 жыл бұрын
This is Badass,bro!!
@Dev-zr8si2 жыл бұрын
This is great I hope you make more.
@thoniasenna23303 ай бұрын
hahahah i love you! best regards from brazil!
@desipawal2 жыл бұрын
beautifully explained
@motngay1niemvui2 жыл бұрын
Sir, please comeback, this is the only one video that i understand -.-
@NirmalSilwal3 жыл бұрын
haha I like your style
@darshandani17 ай бұрын
Thanks for this. Great explanation !
@YOLITOPINTO3 жыл бұрын
Noice explanation, I liked the graphics.
@DevInDetour4 ай бұрын
Great video! Thanks for this
@MisterCK124 Жыл бұрын
Thanks, good explanation!
@ComputerBread Жыл бұрын
You're welcome :)
@NYBlueBlueSky2 жыл бұрын
it's a good video!
@CodingWerkstatt Жыл бұрын
starts bad but is actually insanely good.
@Joytokey1231 Жыл бұрын
Hey! The video is a great introduction to the topic, but I'm afraid you're presenting it to be more trivial than it really is, which may lead some viewers to feel they understand it when they might not. If possible, breaking down the algorithm step by step and explaining each recursive call in detail (at least until the second permutation is generated) could help. The recursive calls that produce nested loops and even more recursive calls aren't simple to keep track of in your head, especially since the "undoing" at the end of the initial for loop only happens after all those nested recursions occur and call their own removals. If you do so, keeping track of which indexes are used in your "used" array instead of the actual numbers may add complexity to the process of explaining it, thanks!
@FabriGLiza11 ай бұрын
Can you please explain to me how the hell does the algorithm manages to not take the previous vector and generate another one totally different? I'm having a rough time figuring it out. If the first vector was [1, 2, 3] and then deletes every element until the vector is void (and every element of the bool vector is false again), why in the world would the algorithm pick 3 after 1, instead of 2? :(
@BobBob-e Жыл бұрын
to me it seems like the return in the first if statement is unnecessary since if the goal is reached none of the choices will be valid and the recursion will stop?
@ComputerBread Жыл бұрын
In this case, yes, but returning early avoids unnecessary computation.
@sarwarjahan052 жыл бұрын
A very good content 👌
@tranpaul45508 ай бұрын
Oh my God, It just clicked, all the time studying backtracking pattern
@xit Жыл бұрын
Interviewer: do this problem1; ComputerBread: I'm the one doing it, I'll do problemA; OK! ...interviewer leaves the call
@dennisllopis2478 Жыл бұрын
2:26 lmao… I was concerned for a moment 😅
@enoch88352 жыл бұрын
OK JUST READ THE CODE but for real thank u for this video
@pratikawate58263 жыл бұрын
Do more videos..it's been 1 year no more videos.. 🙄
@hawadrammeh88702 жыл бұрын
I love you and your ascii joke lol
@Arvindh-xp1lt3 жыл бұрын
great looking for more videos
@weezarrdd Жыл бұрын
hey where are you from? your accent is super cool
@ComputerBread Жыл бұрын
Thank you, I am from France, but I try to "minimize" my accent.
@notdumb31822 жыл бұрын
I love you bro.
@regulardev Жыл бұрын
Thank a lot. It was really helpful in understanding both backtracking and permutation. Future viewers, this is O(n^n ), e.g for an array lof length 3, this logic is iteratively equivalent to int len = arr.Length; for(int i=0; i < len; i++) { for(int j=0; j < len; j++) { for(int k=0; k < len; k++) { if(i != j && j != k && i != k) { List perm = new() {arr[i], arr[j], arr[k] }; result.Add(perm); } } } }
@chaunguyen82023 жыл бұрын
Much better than swapping
@karmeshduggar66942 жыл бұрын
Thank you so much sir!
@tuano-wp9du Жыл бұрын
very nice !! thank you very much
@shaileshwaghmare33 жыл бұрын
Nicely explained
@gazoonman2 жыл бұрын
A is a number change my mind
@snpro_0072 жыл бұрын
Very helpful , thanks!!!!!!!!
@gurjotkheeva13011 ай бұрын
THE BACKTRACKING RECIPE IS PURE GOLD! .... see @4:08
@piyushrewatkar6825 Жыл бұрын
best solution!
@historyrevealed019 ай бұрын
very nice, thanks
@aadi74482 жыл бұрын
All the backtracking stuff is okay, but when are the joke videos coming? 😝 Jk, thanks a lot, this is such a clean explanation!
@tolska. Жыл бұрын
everything was cool until 8:18 ,you became a terrorist
@ComputerBread Жыл бұрын
yeah, I was so done with it! Sorry
@tolska. Жыл бұрын
@@ComputerBread hahahahahaha
@peregrine17 Жыл бұрын
you could have explained it with a dry run of the code
@Yarin58795 ай бұрын
thank you so much
@supremoluminary2 жыл бұрын
I don’t mind the jokes, but actually, they’re kind of a distraction. I’m trying to understand this. Unfortunately, you lost me on the coding.
@adam23sp2 жыл бұрын
amazing
@muratogulcan34 Жыл бұрын
But A is not a number
@vikramragunathan63922 жыл бұрын
Dope :)
@noodkhannavin Жыл бұрын
A is not number .. 😅😂
@robertkovac78245 ай бұрын
thanks
@dubanrubiano842 жыл бұрын
jsjsjs 1:15
@Ziggy01203 жыл бұрын
1:00 hahaha
@Tlj101444 ай бұрын
What's up with the 188 dislikes lol
@ComputerBread4 ай бұрын
it's 191 now T_T
@Tlj101444 ай бұрын
@@ComputerBread fuck them, you should do more videos like this
@mariushostinar663 Жыл бұрын
The beginning of the video was so cringe
@ComputerBread Жыл бұрын
True
@minhbui48172 жыл бұрын
Neetcode has nothing on u lol
@deepak17252 жыл бұрын
Nobody asked my opinion 🤣
@bauyrjanjyenis30453 жыл бұрын
Terrible explanation!
@caminante42223 жыл бұрын
Good content but too much joking and nonsense
@xSlimLizardx3 жыл бұрын
dont be boring
@mostinho72 жыл бұрын
Wow…the guy makes a great video and u complain about him being funny