Dsa
Stack
Easy
Balanced Brackets
Given a string consisting of brackets '()', '[]', and '{}', determine if the brackets are balanced. A string is considered balanced if each opening bracket has a corresponding closing bracket in the correct order. Print 'YES' if the string is balanced and 'NO' otherwise.
Example Input:
{[()]}
Example Output:
YES
Key concepts
stackstring manipulation
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