Given a string expression, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct.

Example

Input: exp = “[()]{}{[()()]()}” 
Output: Balanced

Input: exp = “[(])” 
Output: Not Balanced 

Attachments:

Programming Problem_ Balanced Parenthesis.pptx (application/vnd.openxmlformats-officedocument.presentationml.presentation)
Programming Problem_ Balanced Parenthesis.pdf (application/pdf)