@aparnachand5126

This is so so great that you are putting out shorts! This is the quickest one can revise. You are incredible and innovative.

@abhirama

These shorts are amazing. Keep them coming! You are helping us all remain mentally alert.

@pilapila183

A little proud of myself for thinking of this solution on my own. It’s small but a sign that I’m getting better

@noextrasugar

I am loving these shorts, and when they’re ones I have done before it’s 😻😻

@javabeanz8549

I don't have time to play these games with programming, but I do enjoy the content. I also enjoy code editors that highlight the matching parentheses.

@Joeybamsandmore

Thank you for these vids neetcode, I had a problem similar to this recently and having watched this video really helped. Thank you for saving YouTube shorts brainrot, I make sure to always watch these videos all the way through when they pop up

@n.h.son1902

I believe Map[c] would be close_to_open[c]

@Lin_The_Cat_

Good solution :) you essentially just explained the utility of a Push-Down Automaton in a scenario like this without letting the message get obscured to beginners by the heavy-handed jargon that would otherwise naturally come with Theory of Computation concepts like automata.

@bilbo_gamers6417

keep a stack of open parentheses. see an opening one, add it to the stack. see a closing one, pop the top off the stack and check if it's the opening counterpart to the closing one you are seeing. if it's not, or if the stack is empty, return False. if you get through the whole string and the stack is empty by the end, return True. if there are still some values on the stack, return false.

@pwc123451

Very simple and elegant solutions. thank you :o

@hassan_codes

Quick correction: The singular of parentheses is parenthesis, the pronunciations are identical.

@jumpjump-oz2pr

I have seen this problem before , ended up writing array fuckery I didn’t know the data structure yet at the time

@GK-dd5ci

For more context, this is Dyck language which can be represented by context-free grammar which can be transformed into push down automata (which might inspire the solution for this problem).

@EbeduPaul

How do people learn all this ???

@QuantumCanvas07

What language is that

@nnofficial2414

Great tip!

@_Danon4ik_

Why test 99( where s = "[([]])" ) 
Output is true?

@d3vilscry666

For the close_to_open dictionary, why couldn’t you have done open to close?

@asagiai4965

nice explanation