I love that NeetCode has gotten all the milk he needs now and he does the daily vids again.
@nikhil1990292 ай бұрын
its has become cheese now
@deadlyecho2 ай бұрын
I figured the stack solution but the other solution is messy...
@shepmax5552 ай бұрын
Thanks for posting LeetCode daily problems. It's really helpful
@jaydeeppatel21762 ай бұрын
Strings are immutable in python so the second solution is only good for c++
@prajwals82032 ай бұрын
Thanks for the vid.....It helped to understand that inplace solution and editorial did fantastic job of explaining the in place solution🙂🙂....
@AlfredPros2 ай бұрын
The slow, but short code to solve this problem is using regex replace. def minLength(self, s: str) -> int: while True: slen = len(s) s = re.sub("(AB|CD)", "", s) if slen == len(s): return slen The loop breaks when there's no more AB or CD to replace. In this case, regex ran slower than string replace.
@muskaanfathima81832 ай бұрын
im trying to stay consitent but everyday I come and find neetcode for solutions...I'm I on the right track :(
@aIgojoeАй бұрын
Trust it gets easier over time. If the problem seems too hard or complicated, chances are that you haven’t found the right Data Structure (Stack in this case) or algorithm to solve it easily.
@muskaanfathima8183Ай бұрын
@@aIgojoe yes hope I'll get better
@birdbeakbeardneck36172 ай бұрын
whats a general solution for a set of strings, and the removable syrings cant be substrings or share paets with each other?
@SidhanthSanil2 ай бұрын
Consistent 😛
@anandsahoo37112 ай бұрын
i did it recursively class Solution { public int minLength(String s) { return solve(s); } public int solve(String s){ for(int i=0; i
@chien-yuyeh93862 ай бұрын
Thanks for sharing! 🎉
@robertbaindourov1342 ай бұрын
Yeah, great job. Thank you.
@sirojiddinSoftwareEngineer2 ай бұрын
Great job
@khalidhussien67642 ай бұрын
Please do "1497. Check If Array Pairs Are Divisible by k".