Given a string expression, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct.
Example:
Input: exp = “[()]{}{[()()]()}”
Output: BalancedInput: exp = “[(])”
Output: Not Balanced
Attachments:
Programming Problem_ Balanced Parenthesis.pptx (application/vnd.openxmlformats-officedocument.presentationml.presentation)
Programming Problem_ Balanced Parenthesis.pdf (application/pdf)
Programming Problem_ Balanced Parenthesis.pdf (application/pdf)