Question: We are given a string expression of size N which contains just opening and closing brackets of the types, ' ( , 2 7 .

We are given a string expression of size N which contains just opening and closing brackets of the types, '(,27. C . T and T. The task is to check if the given expression contains balanced parentheses. Write algo- rithm/ Pseudo Code to implement the above stated scenario.
Sample Input "O"
"O{[]}"
"O{"
Sample Output Balanced
Balanced
Unbalanced

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!