Master Data Structures & Algorithms For FREE at AlgoMap.io!
@NavneetKaur-x6qАй бұрын
After looking at several other videos, I finally found one where all my questions were answered. Loved the simplicity of the explanation whether whiteboard, coding part or the complexity.
@SHIHJUIheh4 ай бұрын
Thank you for explaining drawing part in detail, especially the recursive backtracking part ! You made this concept so much easier!!!
@GregHogg4 ай бұрын
You're very welcome 😎
@itsmenatika27 күн бұрын
I've started understanding backtracking by that. In only 12 minutes. Thanks
@anothertechguy-q9g2 ай бұрын
Thank you a lot for explaining the transitive parts of backtracking!
@FZRides5 ай бұрын
Hi Greg, I found your video very intuitive. Thanks for sharing such content. Can you please make a video on "Tower of Hanoi" problem using recursion. I am unable to catch the recursive logic behind it. Can you please do it Sir.
@chisomedoka56515 ай бұрын
this is gold, so intuitive . Thanks for this
@kenkaneki5433Ай бұрын
better than stp neetcode guy explanation
@olaf90635 ай бұрын
Great explanation, thanks. Is the time complexity not O(n * 2^n) - reason being that at each of the terminal nodes you need to copy the list, which is an O(n) operation?
@henryhan88385 ай бұрын
You've inspired me, I was just wondering why we multiplied it by n.
@DivineEdoka2 ай бұрын
I'll like to see how you slve subset ii with this pattern as well
@sampjm18986 ай бұрын
you can use a dp solution : fn(n)=fn(n-1)+{fn(n-1) and put element_n in every set that return by fn(n-1)},cache the result of f(n).,f(n-1)..... consider you need to solve all the fn(n) you can write a bottom up dp solution, consider for each fn(n) only need f(n-1) you can just maintain one layer of cache so basic case is {[element_1],[empty]} for every element in the array add this element to each set and add this set back to the result: so the 2nd iteration: {[element_1],[empty], [element_1,element_2],[element_2]} and so on sorry for my English
@GregHogg6 ай бұрын
I'll have to look into this. Thanks so much for sharing!
@supremoluminary5 ай бұрын
Do you have a link to this? I want to learn it. Thanks.
@shubhambajaj49393 ай бұрын
brilliant solution. you just got yourself a new subscriber :)
@christianjt70183 ай бұрын
thanks Greg your explanations are the best!
@GregHogg3 ай бұрын
Bro I can see from the comments that you're just flying through these questions, good for you honestly!
@dusvn1484Ай бұрын
Nice video,helped me a lot!
@nav2133 ай бұрын
Would backtracking have to do with recursion? Is it possible to solve this in a non-recursive way? I am asking because it's really difficult to understand the recursive implementation of the code unless you memorize it. Thanks again for you awesome tutorials!!!! cheers
@GregHogg3 ай бұрын
You can memorize the template for how this is done, I promise the best way is through recursion
@GarouNguyen4 ай бұрын
bro how do you move recursion left what is line 12 code back track i + 1 , why you have two backtrack(i+1) can you explain bro
@Alex-tm5hr27 күн бұрын
Can you pls make a vid for subsets 2?
@just4laughs1403 ай бұрын
what does backtrack(i +1) mean
@phamh7927 күн бұрын
many thanks.
@GarouNguyen4 ай бұрын
bro why don't pick and pick is same backtrack(i+1) and why you recursion left i + 1 i don't understand
@m.y.72304 ай бұрын
thanks for explaning dfs in drawing
@GregHogg4 ай бұрын
No problem!
@anti-dn5416 ай бұрын
Easy to understand for noob like me 👍🏻
@GregHogg6 ай бұрын
Oh that's so great to hear 😊
@maskedoni32296 ай бұрын
Great solution
@GregHogg6 ай бұрын
Thanks so much!
@Antinormanisto5 ай бұрын
I don't understand(
@GregHogg5 ай бұрын
Maybe try watching it again? Backtracking is REALLY confusing at first