Hi Gys, Video is long, if you want to Jump to most Optimal Solution pls go from Approach 2 -directly-> Approach4 (Only 2 Approaches) If you want to understand reversing strategy in Paranthesis problem -> Approach3 Basic Human Approach -> Approach1 I don't want to waste your time, so pls jump to specific Approaches you like ❤ New VIDEO - kzitem.info/news/bejne/1o5_voqBfaB5i2Usi=R89M32F_p2HNheUs
@codingkart245
5 ай бұрын
Your intuitive way of explaining things is just awesome!!! Please don't stop making videos like this of daily leetcode challanges!
@steverogers7050
3 ай бұрын
Great Explanation Bro ....amazed to see you explaining such things at this age keep it up bro
@THOSHI-cn6hg
Ай бұрын
we could use a two pointer approach too - , which would be a one pass solution
@ITACHIUCHIHA-dr8sz
5 ай бұрын
We can also use the string::operator+=, which is overloaded for chars and internally calls to the push_back() function.
@ARYANMITTAL
5 ай бұрын
Yes sir, but just be cautious on char* or string, then this won’t be calling pushback, but yeah for characters it works same🔥🫡
@ravindrakanchu7504
5 ай бұрын
Love u bro u 💗
@A_Myth963
5 ай бұрын
Bro last Solution was 🔥
@ARYANMITTAL
5 ай бұрын
❤️❤️🫂thank u sir
@kgjr.6224
5 ай бұрын
I Usually Solve the Question and then come here to get the Optimal Solution.
@kgjr.6224
5 ай бұрын
and I like it
@viking8774
4 ай бұрын
Same here
@joychoudhury175
5 ай бұрын
hi, Aryan! in approach 4 if we traverse the string backward and move "(" until dif is 0, will it work?
@elliotalderson9517
5 ай бұрын
based Aryan, the Austrian painter was rigth
@karanwagh4829
5 ай бұрын
Hi Aryan, as you said that ans+=char takes O(n) operation in java and c++ too but as I code in java I thing there is no other option to append character at back. If you know pls can you mention it.
@ARYANMITTAL
5 ай бұрын
Nhi nhi sir, ans += c will take o(1) but same is not true for string, as ans += c in cpp internally calls push back only, same ig works in java too, but so as to mot get confused & mistakenly use += with strings, i always recommend using push_back
@karanwagh4829
5 ай бұрын
@@ARYANMITTAL Ok thanks.
@karanwagh4829
5 ай бұрын
@@ARYANMITTAL Ok Thanks now It's clear.
@WiFiWaLaaa
5 ай бұрын
@@ARYANMITTAL area bhai buT JAVA mai kai hota hai (jasea C++ mai hota hai `push_back` for strings) vasea ?
Пікірлер: 19