Remove Invalid Parentheses | Leetcode 301 | C++

  Рет қаралды 11,378

Ayushi Sharma

Ayushi Sharma

Күн бұрын

Пікірлер: 63
@smritigupta9730
@smritigupta9730 2 жыл бұрын
In love with your explanation! Every question you explain becomes crystal clear. THANKYOU😃😃
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you so much Smriti 🤗
@webtechbysuraj5942
@webtechbysuraj5942 Жыл бұрын
We're getting TLE using this approach!!
@aravindkumaresan2747
@aravindkumaresan2747 2 жыл бұрын
Hi @Ayushi Sharma, thanks for the great explanation. But I do have some questions/suggestions to optimize. 1. This algorithm will try to remove the chars as well 2. We can just check the count of left or right invalid parantheses. Eg. If the invalid parentheses are just ))) from the stack output, then there's no point in removing ( parentheses in recursion Let me know if these approaches work better!
@shrimpo6416
@shrimpo6416 2 жыл бұрын
Great video! I love it especially when you explain each part of your code with graphs, so useful! please please keep doing more!
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you so much, glad it was helpful :)
@surparaju2945
@surparaju2945 2 жыл бұрын
Good video with an explanation along with diagrams. Please keep doing more and more. Thank you :)
@AyushiSharmaDSA
@AyushiSharmaDSA 3 ай бұрын
thank you :)
@vinitverma1741
@vinitverma1741 2 ай бұрын
that's the superb explanation ma'am ! 😄
@AyushiSharmaDSA
@AyushiSharmaDSA 2 ай бұрын
Thanks a lot 😊
@tombrady7390
@tombrady7390 3 жыл бұрын
yes we needed quality questions like this awesome didi.
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
Thank you Prajjwal. Sure✌🏻
@swapnilhajare5557
@swapnilhajare5557 Ай бұрын
Thanks for the Video, great explanation.
@AyushiSharmaDSA
@AyushiSharmaDSA Ай бұрын
You are welcome! :)
@hassankazmi5443
@hassankazmi5443 Жыл бұрын
Great job on explanation, diagram was really helpful!!
@AyushiSharmaDSA
@AyushiSharmaDSA 3 ай бұрын
thank you :)
@46anuragmodi14
@46anuragmodi14 3 жыл бұрын
this video was really a good one. expecting some more videos on recursion and backtracking. thanks for making such a great video.
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
Thank you Anurag. Sure, more videos on the way🙂
@aradhyanigam6109
@aradhyanigam6109 3 жыл бұрын
Literally ,What an Explaination ... 🔥 Thanks Mam 🙇🏻‍♂️
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
Welcome. Glad you found it useful :)
@aradhyanigam6109
@aradhyanigam6109 3 жыл бұрын
@@AyushiSharmaDSA 🙇🏻‍♂️🙇🏻‍♂️🙇🏻‍♂️
@shubhamkamdi6606
@shubhamkamdi6606 11 ай бұрын
Very beautifully explained
@AyushiSharmaDSA
@AyushiSharmaDSA 10 ай бұрын
thank you Shubham :)
@adityabhandari6688
@adityabhandari6688 2 жыл бұрын
you made a leetcode hard question so easy.. salute
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you Aditya, glad it was helpful :)
@mayankkumar4864
@mayankkumar4864 2 жыл бұрын
Mam, the problem is not being accepted in leetcode as the code is giving wrong answer for me, it is giving the same wrong output to t me as being displayed at timestamp at 10 : 20 , kindly look into this
@llamamerogelio
@llamamerogelio Жыл бұрын
Really well explainen!
@AyushiSharmaDSA
@AyushiSharmaDSA 6 ай бұрын
thank you, glad it was helpful :)
@arshadiqbal2893
@arshadiqbal2893 Жыл бұрын
nice
@rohandevaki4349
@rohandevaki4349 2 жыл бұрын
at 3:00 , all the possible cases are sometimes returned by DP also right? or no? backtracking also
@jatinbhuker7929
@jatinbhuker7929 2 жыл бұрын
Code is not working for all test cases like this - d(((p)((x( this test case is on gfg, any help btw nice explanation.
@rohandevaki4349
@rohandevaki4349 2 жыл бұрын
i have tried to solve this in recursion method by first branch would be to take that character, second is to not to take that character, but this is giving me run time error, what else could be the possible way to solve this?
@tridibbag6186
@tridibbag6186 3 жыл бұрын
resume share nehi koroge apki?😢😢😢 video bana do ek apki resume ke upor........by the way nice explanation👌❤
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
Karungi, bas thodi der wait krlo🥺
@trivedi2690
@trivedi2690 3 жыл бұрын
hi aryusi had you use codesignal plateform ?
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
No, I haven't
@sagarbora7768
@sagarbora7768 2 жыл бұрын
Mam in this problem where bktracking is used?
@hemantsurariya3239
@hemantsurariya3239 2 жыл бұрын
Thank you :)
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome, glad it was helpful :)
@ecs185_shaileshbharti3
@ecs185_shaileshbharti3 2 жыл бұрын
Perfect Explanation 💯🔥
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you Shailesh :)
@ramkrushnapatra1217
@ramkrushnapatra1217 2 жыл бұрын
What is time complexity of the code?
@nitishrathi3191
@nitishrathi3191 Жыл бұрын
solution is wrong ..
@swingstockstrader
@swingstockstrader 3 жыл бұрын
You are in which year mam
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
I am currently working
@45_ritiksharma32
@45_ritiksharma32 2 жыл бұрын
In java this will give tle
@sanskargubreley8754
@sanskargubreley8754 Жыл бұрын
what's the TC?
@amulop
@amulop 3 жыл бұрын
Hello didi apka koi social media account nhi ha ?
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
you can connect with me on linkedIn
@amulop
@amulop 3 жыл бұрын
@@AyushiSharmaDSA but message section is locked there im already connected ?
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
@@amulop is that so, can you share your LinkedIn link
@amulop
@amulop 3 жыл бұрын
@@AyushiSharmaDSA didi kr diya message thank you ❤️
@sudeepsudarshanrana800
@sudeepsudarshanrana800 2 жыл бұрын
no !
@aakashvishwakarma4653
@aakashvishwakarma4653 3 жыл бұрын
🪔🪔Happy diwali Mam 🪔🪔
@AyushiSharmaDSA
@AyushiSharmaDSA 3 жыл бұрын
Happy diwali Aakash🙂
@rams2478
@rams2478 2 жыл бұрын
Great explanation.. however in Java it is exceeding the Time Limit. Anybody faced the similar issue in Leetcode for Java?
@shushantgaur9420
@shushantgaur9420 2 жыл бұрын
i am doing it in c++ and it is showing the same thing. TLE :(
@shushantgaur9420
@shushantgaur9420 2 жыл бұрын
i guess you are doing the same mistake I was. you should put all the string inside the map irrespective of whether it is valid or not. that way it will run faster.
@rohandevaki4349
@rohandevaki4349 2 жыл бұрын
we are getting TLE for this type of case ""()((((((()l("
@joebale9670
@joebale9670 2 жыл бұрын
yeah same here , how did you solve it??
@ronaldsitumorang2250
@ronaldsitumorang2250 2 жыл бұрын
She already used hashmap mp in her code to avoid TLE issue, it is called memoization.
@ranjitchakraborty6166
@ranjitchakraborty6166 2 жыл бұрын
Wrong explanation
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
Don't underestimate anyone
00:47
奇軒Tricking
Рет қаралды 21 МЛН
Recursively remove all adjacent duplicates | Recursion | C++
15:08
Ayushi Sharma
Рет қаралды 10 М.
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 740 М.
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,2 МЛН
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59