FACEBOOKS #1 INTERVIEW QUESTION (2022) - MINIMUM REMOVE TO MAKE VALID PARENTHESIS [PYTHON]

  Рет қаралды 4,575

Cracking FAANG

Cracking FAANG

2 жыл бұрын

In this video we're solving Facebook's #1 interview question as of February 2022. This question introduces some common patterns that you'll use for many parenthesis based questions on Leetcode and it's probably going to come up in your FB phone screen or onsite so definitely one to know!

Пікірлер: 12
@YT.Nikolay
@YT.Nikolay Жыл бұрын
I could not solve it when I saw this problem 1st time, I am proud that today I cracked this problem before watching your video. Thanks for posting videos, your content definitely helps me to progress!
@crackfaang
@crackfaang Жыл бұрын
Sometimes it’s like that. I can’t tell you how many solutions I had to look at and videos to watch before things started clicking for me. I think as long as you understand how/why a solution works, there’s no problem looking at it if you are stuck. It’s just important to learn it so that when you inevitably come across another similar question, you can apply what you learned
@YT.Nikolay
@YT.Nikolay Жыл бұрын
@@crackfaang I watch your videos till the end because: want to be sure my solution is optimal, 2nd watched to the end counter +=1 :)
@rsKayiira
@rsKayiira 2 жыл бұрын
Great video, we need more of these!!
@sagarpanwar2724
@sagarpanwar2724 7 ай бұрын
Why can’t you have a stack : push when you see ‘(‘ pop when you see’)’ if there is nothing to pop then the remaining ‘)’ are to be removed. Store the indices of ‘)’ and return the string without them. Any thing wrong with this approach?
@ketulshah5462
@ketulshah5462 2 ай бұрын
I have same question.
@cfbf96
@cfbf96 2 ай бұрын
you can, but in the interview they often ask you to solve without a stack
@shuier525
@shuier525 6 ай бұрын
I feel the last several lines "elif cur_char == ")" res.append(cur_char)else:res.append(cur_char)" can be simply combined to "else:res.append(cur_char)"
@TheBIKEDEALZ
@TheBIKEDEALZ 4 ай бұрын
had this question in Amazon automation position, but failed to do it - thanks for your explanation.
@rezaafra9785
@rezaafra9785 5 ай бұрын
Excellent Explanation
@charliebitme-zb3nv
@charliebitme-zb3nv 5 ай бұрын
lovely explanation
VALID PALINDROME - SOLUTION EXPLAINED [PYTHON] | LEETCODE 125
9:57
VALID PALINDROME II [PYTHON]
11:45
Cracking FAANG
Рет қаралды 1,1 М.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 107 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 38 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 41 МЛН
EXCLUSIVE TIME OF FUNCTIONS | LEETCODE 636 | PYTHON SOLUTION
15:42
Cracking FAANG
Рет қаралды 4 М.
Oh, wait, actually the best Wordle opener is not “crane”…
10:53
DOT PRODUCT OF TWO SPARSE VECTORS - 3 SOLUTIONS EXPLAINED [PYTHON]
31:06
LOWEST COMMON ANCESTOR OF A BINARY TREE III [PYTHON]
16:38
Cracking FAANG
Рет қаралды 9 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 265 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 78 М.
but what is 'a lifetime?
12:20
leddoo
Рет қаралды 65 М.
Valid Parenthesis String - Leetcode 678 - Python
13:43
NeetCode
Рет қаралды 64 М.