At the stage of life your viewers usually might be, the fact that you are putting out all this content is more than enough, even if the explanation is not very precise. So don't feel bad, just keep uploading. You are really helping a lot.
@MrThepratik4 жыл бұрын
"close < open" really saves a good deal of code . I was thinking to generate all possible combination and terminate if length exceeds or if its an unbalanced string
@surajdhar44843 жыл бұрын
can you explain how "close< open" saves more time than "open>close"?
@JSDev7763 жыл бұрын
they will work exactly the same if that's all you're changing,
@sabisyed3 жыл бұрын
i was beating my head around this for hours and i think i went over your video atleast 8 times and i finally got it !! thanks a ton !
@projectsdb4034 Жыл бұрын
Would love to see your walkthrough code complete on white board.
@sreekantht.m19645 жыл бұрын
You have awesome teaching skills. Understood it in one go after watching ur vid.
@stuxvt Жыл бұрын
Your discussion of making a template to backtracking, and working through the logic while adjusting input variables helped me solve "Letter Combinations of a Phone Number" using the same method without looking anything up. Thank you, feel much more confident on building elegant backtracking solutions.
@rakshith35474 жыл бұрын
Please plan to do whiteboarding and explaining the backtracking tree and what happens in the stack trace. That helps a lot compared to just typing the already existing solution!
@naveenkumarbr11114 жыл бұрын
Can you also please explain the big O for time and space with such problems, that would be very helpful. Great explaination !
@JM_utube4 жыл бұрын
good video, nick. honestly it takes a while to get backtracking, then to REALLY get backtracking
@deepeshkataria4533 жыл бұрын
I was wondering how the solution is being checked , caz solution patterns are printed in any order!
@kaushal1364 жыл бұрын
So I have been doing leetcode and backtracking since 2 months and your 1 12 min video made me learn so much more ! Thnxx
@BhavyaBhaga4 ай бұрын
I am writing this comment and i really hope you read it. I love the way you solve problems, you keep the explanations so crisp & clean without extra talks. I learnt so much from you. I wish you the best Nick.
@deanhu34102 жыл бұрын
brilliant explanation. showing n = 2 as an example really helps.
@sunilraut47193 жыл бұрын
I am following many youtubers over the year but when you explain a solution to a complex problem it just sounds easy, I really like your approach. Keep the good working going !!
@Firecloak4 жыл бұрын
The leetcode solution didn't make much sense to me, but your video clears it up!
@RK-nw1nq4 жыл бұрын
Hi man, great video and an amazing explanation. Do you think you can make a video in the future explaining this code's time complexity? It would be very helpful. Thanks!!
@eugenevedensky60713 жыл бұрын
I think the interesting part about your algo is that the if statements prevent us from creating redundant duplicate strings, which is really clever. I sovled this but ended up using a set to avoid the duplicates, which obviously screamed hack to me.
@suhailahmad65052 жыл бұрын
Just Amazing, don't have words about the way you have written the details of the recursive call, Thanks a lot man, appreciate your work
@xuehaizhou83353 жыл бұрын
don't understand why backtrack doesn't generate duplicate strings. anyone can help me with it?
@sureshgarine2 жыл бұрын
I really like the way you generalize how the template would be for backtracking, very nice explanation. Thank you nck. keep doing the good work to help us
@bellahasguns4 жыл бұрын
love your video and expanation. could you do a walk thru on 131. Palindrome Partitioning, it is a backTracking as well, but having a hard time understand the step inside the recursion calls? appreciated.
@Rayyankhantheboss3 жыл бұрын
as far as I know backtracking is going back, changing the solution and then recursing again, however u never backtracked u only recursed smartly making sure u chose valid paths
@suhailahmed2783 жыл бұрын
Could anyone tell me what is the time complexity of this solution? Please!
@Dani-zf7cuАй бұрын
Thanks so much Nick. Really helped me understand backtracking and it was pretty great and clean code.
@dipeshpandey46243 жыл бұрын
Thanks for discussion and explanation, I believe this solution is also going to push 6th item as ()())(, so we might have to check the validity of parenthesis before pushing into the list in line 10. I checked with n = 3.
@MrVenona3 жыл бұрын
Went to a number of other pages/videos for this. You are the best! I don't need to search more!
@heisenberg18444 жыл бұрын
Hi Nick. I really liked the explanation. Please do more backtracking problems. Thanks.
@anirudhbukka5413 Жыл бұрын
Is this really backtracking? It seems to be just recursion, we are not "backtracking" to any point anywhere in the code.
@pranavsriram85 жыл бұрын
Thanks man, really helped understand backtracking! Great video! You don't need to redo!
@pranav534653 жыл бұрын
Great comment and great name
@rathan2353 жыл бұрын
Hi Nick, thanks for the explanation. Can you please explain how to solve it with stack?
@sober_junkie57093 жыл бұрын
I never understood how the generation of the next combination started on it's own...
@LoLLuL-d5m9 ай бұрын
is it really backtracking, I don't see where we are backtracking a decision we already made. we are not removing chars from the string that we already added.
@LoLLuL-d5m9 ай бұрын
seems recursion to me. Explain pls
@yumo2 жыл бұрын
Implementation of this was really clean
@andresabello56394 ай бұрын
You are awesome at what you do. Keep in coming, my mentor!
@alphagrowth33272 жыл бұрын
Thanks for the solution and the dry run.
@yanchengpan5433 жыл бұрын
can you draw out a tree for this? plainly through recursion is still kinda hard to imagine
@kaustavprime39202 жыл бұрын
What's the space and time complexity of the solution?
@vanessachammas3525 жыл бұрын
super helpful, but if you could leave a link of ur notes so we could follow through that would be cool~
@ashutoshpandey14737 ай бұрын
Can somebody explain that why this solution is not working with StringBuilder instead of String?
@nirmal43434 жыл бұрын
Nice work!, what would be the time complexity?
@zacharysong48632 жыл бұрын
It works if delete the line 11 return;
@shubhamkhurana75455 жыл бұрын
An Absolutely "WOW" Solution !!!
@NickWhite5 жыл бұрын
i feel like i fell off the leetcode train so bear with me while i get back up to speed
@shalin094 жыл бұрын
It will be good if you explain the time and space complexity after solving the problem. That would really help! Thanks in Advance :)
@pranavyeleti34994 жыл бұрын
nick do u individually study or u study with another partner
@priyankagaikwad99093 жыл бұрын
what is the time complexity of this algorithm? Looks more than 2^n
@ujjvalsharma50554 жыл бұрын
Hey Nick I have been watching your videos for a quite some time now, and I wanted to say that you are doing a great job here. Keep it up :).
@aspa-n-fyt77854 жыл бұрын
Hi! i i got 4 lines instead of 5 with n=3: ((())), (()()), ()(()), ()()() without (())(). what is the problem?
@OmarAhmed-od9rf2 жыл бұрын
How does this esnures there are no duplicates?
@OmarAhmed-od9rf2 жыл бұрын
insures*
@sauravthakur29152 жыл бұрын
Isn't this solution a recursive solution rather than backtracking ?
@InfoBuzz11302 жыл бұрын
My favourite youtuber. love your vids man
@wardenofthenorth-w5d4 жыл бұрын
Wow... I knew you years ago but never spent time watching y. It's amazing...
@sasivardhanbonthu81593 жыл бұрын
Already open=2 at starting but int close less than open you wrote 0 less than 1 but open =2 know?
@helperclass3 жыл бұрын
Explanation was really helpful. Thanks!!
@nking99t Жыл бұрын
So this is a Greedy Strategy right? it is hard to demonstrate close < open will output the valid ones. so you just need to remember the answer. if this is your first time seeing this question, it may be hard to comes up with this strategy.
@amansayer4943 Жыл бұрын
imagine if he uses a board to teach this stuff it will be cleared in one go
@aman65614 жыл бұрын
it's one of the best explaination mate.
@bhavukpahuja2693 жыл бұрын
Great Explanation. Completely understood.
@dev-skills3 жыл бұрын
backtracking very well explained.
@nagalakshmichithambaranath11474 жыл бұрын
Wow, this backtracking never gets into my brain. you explained it so nicely.
@vasubhatnagar33524 жыл бұрын
please can you help me understanding backtracking..i'm trying from past 2 months but failing miserably.
@nagalakshmichithambaranath11474 жыл бұрын
@@vasubhatnagar3352 any recursive backtracking can be assured achieved by iterative breadth first search. If you are comfortable with iteration, you can try that.. word search by Nick white covers one such..
@nagalakshmichithambaranath11474 жыл бұрын
@@vasubhatnagar3352 backtobackswe also covered backtracking recursion.. solving Sudoku or solving maze can be achieved by recursive backtracking. Don't lose hope.. just keep trying
@himanshurajpal7842 Жыл бұрын
Is this backtracking? You only used recursion
@pacificknight4144 жыл бұрын
Very clear explanation, thank you very much!
@killingjoyandmemeing3 жыл бұрын
Found Goldddddd!! Thanks man
@chiragaparadh14173 жыл бұрын
I thought we would use those Catalan numbers here...
@raaghaviravisankar18533 жыл бұрын
Thanks for such precise neat explanation
@gopikrishnan81824 жыл бұрын
Good explanation. Thanks Nick
@rahulmistry91734 жыл бұрын
Oh man! That was flawless....WOW man....
@handanunal40404 жыл бұрын
The video helped me a lot understanding the problem, thanks
@soffwhere2 жыл бұрын
Trying to solve this alongside you, set playback speed to 0.5X. You sound like a brilliantly hilarious drunk. Also-- thank you so much for your content!
@nathamuni94353 жыл бұрын
thanks but plzz try to explain as neetcode does... pretty easy
@rak5904 жыл бұрын
Great video Nick. Thanks a lot!
@yutingsun16902 жыл бұрын
if I change open + 1 to open++ it would not work, can anyone explain why?
@zacharysong48632 жыл бұрын
Open++ will add "1"after that traverse, the thing you need is ++open.
@kunalkheeva2 жыл бұрын
perfect, thank you.
@xufengzheng13182 жыл бұрын
support from China!🥳Very good explanation
@yuzhudong80443 жыл бұрын
Crystal clear!
@ahmede7141 Жыл бұрын
Thanks a lot!
@AmolGautam3 жыл бұрын
Thank you so much.
@liedebunker12532 жыл бұрын
That's a much higher hand. I'm ashamed of myself.😓😓
@user32132x5 жыл бұрын
Thanks 🙂 it was very helpful keep it up. 👍
@pepetikesavasiddhardha78522 жыл бұрын
nice and simple logic
@missionstatusactive84703 жыл бұрын
ur good bro.....need guys like u who teaches ds LOLzzzz
@maarcusfonseca10 ай бұрын
good explanation
@davaa8474 жыл бұрын
Hey man, it was good. Thanks.
@hawsh30665 жыл бұрын
3 videos in 5 hrs XD
@AkshayKumar-xh2ob4 жыл бұрын
Great video
@Naton4 жыл бұрын
Please slow down on the scroll. Hard to follow. Might as well use pythontutor
@zachsun38933 жыл бұрын
you fuckin legend bro
@pradeepmehra68794 жыл бұрын
Lovely !!
@triplestrikee8753 жыл бұрын
like it!
@abe104 жыл бұрын
Great video this. Sadly he's pushing crap videos now a days 😔