0
Can anyone please help me too for solving this problem
4 Réponses
+ 1
What help you need? Add details..
Post your attempt also...
https://www.sololearn.com/discuss/333866/?ref=app
+ 1
Sorry i am new to this so i don't about python can you tell answer for this and explain me
+ 1
Thank you so much
0
Seems that you completed python data structures 95% + . So must be aware of python fundamental?
Or are you started directly this course first?
Go step by step.. To understand this, you must be aware of stack operations..
stack is a data structure in which items are pushed from top and removed from top as well. So last one inserted is next one removed first from others.
Balanced parenthesis are those which are properly have parenthesis like (a+b) have a open brace, and next immediately is a close braces, in between an expression.
((a+b) have not balanced since 2nd ( closed properly but 1st ( is not closed.
) (a+b) not balanced properly closed paranthesis ')' before opening (.
(A)(B) properly balanced paranthesis.
By using stack, you can push ( to stack when encounter. and pop same '(' when you encounter ')'. If there is no '(' in stack then it is not balanced properly. After complete reading, if the stack is empty then then it is balanced properly. If not then unbalanced.
Hope it helps to understand it.