LeetCode 22. Generate Parentheses

preview_player
Показать описание


Preparing For Your Coding Interviews? Use These Resources
————————————————————

Other Social Media
----------------------------------------------

Show Support
------------------------------------------------------------------------------

#coding #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

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.

ashishranjan
Автор

"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

MrThepratik
Автор

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 !

sabisyed
Автор

Would love to see your walkthrough code complete on white board. <3
Anyway great explanation.

projectsdb
Автор

You have awesome teaching skills. Understood it in one go after watching ur vid.

sreekantht.m
Автор

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.

stuxvt
Автор

don't understand why backtrack doesn't generate duplicate strings. anyone can help me with it?

xuehaizhou
Автор

I was wondering how the solution is being checked, caz solution patterns are printed in any order!

deepeshkataria
Автор

So I have been doing leetcode and backtracking since 2 months and your 1 12 min video made me learn so much more ! Thnxx

kaushal
Автор

good video, nick. honestly it takes a while to get backtracking, then to REALLY get backtracking

JM_utube
Автор

Can you also please explain the big O for time and space with such problems, that would be very helpful. Great explaination !

naveenkumarbr
Автор

Could anyone tell me what is the time complexity of this solution? Please!

suhailahmed
Автор

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

suhailahmad
Автор

Went to a number of other pages/videos for this. You are the best! I don't need to search more!

MrVenona
Автор

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

sureshgarine
Автор

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!

rakshith
Автор

brilliant explanation. showing n = 2 as an example really helps.

deanhu
Автор

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.

bellahasguns
Автор

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.

dipeshpandey
Автор

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

Rayyankhantheboss