thanks for the logic brother but it can be cleaned up like this for(int i=0;i
@Study-zc7qh9 ай бұрын
Thank you so much ... Honestly i understand your approach only
@hwrshАй бұрын
a better approach
@souravmukherjee7323 Жыл бұрын
Amazing explanation buddy ...the way u were solving live in this vdo was great ....telling us how to approach to this kind of problem
@gamerzfieldhandel4 ай бұрын
Amazing explanation broo 👏🏻👏🏻
@ruturajkadam5164 Жыл бұрын
nice solution and easy explanation thanks a lot
@Explorers05 Жыл бұрын
it clear my concepts and learn logic building concept...... great keep going bro one more solution using same logic string removeOuterParentheses(string s) { string ans=""; int count=0; for(int i=0; i0) { ans+=s[i]; } count++; } else if(s[i]==')') { count--; if(count>0) { ans+=s[i]; } } } return ans; }
@shaikmudassirali7202 Жыл бұрын
Nyc explaination bro keet it up💗💗
@simranbandhu9926 Жыл бұрын
It would be great if you explain intuition behind it.
@anandpandey918 Жыл бұрын
Thank You Brother.
@codingkart245 Жыл бұрын
It can be done easily using stack btw. When I have to do it with count by checking prev value of count, I don't have to use a flag. Anyway you did explained it nicely how you came up with the solution. Keep going.
@kartheekdasari9349 Жыл бұрын
what abou the space complexity thats y stack is not preferred
@beastboy..4 ай бұрын
class Solution { public String removeOuterParentheses(String s) { StringBuilder ans = new StringBuilder(); int start = 0; int check = 0; for(int i=0;i
@AbhishekKapoor07 Жыл бұрын
Thanks man for this :)
@akash_hiccup289 ай бұрын
nice solution
@AMIT-hw8fo Жыл бұрын
Great logic ❤
@ilihaspatel3992 жыл бұрын
It take me 2 hours to solve this question
@RAHUL-pe7jv2 жыл бұрын
Did you solve yourself or with the help of solution?
@Area-fd8ht Жыл бұрын
@@RAHUL-pe7jv tere se mtlb bsdk
@somyasrivastava63153 жыл бұрын
Amazing
@sibiranganath8 ай бұрын
Is this approach similar to moore's voting alog???
@YashVermaBEC9 ай бұрын
class Solution { public: string removeOuterParentheses(string s) { int count=0; string ans=""; for (int i=0;i