Dsa
Stack
Hard
Balanced Symbol Check
You are given a string consisting of various symbols, including parentheses '()', brackets '[]', and curly braces '{}'. Write a program that checks if all the symbols in the string are balanced. A string is considered balanced if each opening symbol has a corresponding closing symbol in the correct order. If the input string is balanced, print 'Balanced'. If not, print 'Not Balanced'.
Example:
Input:
{[()()]}
Output:
Balanced
Key concepts
stackvalidationsymbol matching
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now