Dsa
Stack
Medium
Balanced Parentheses Validator
You need to validate if a given string of parentheses is balanced. A string is considered balanced if every opening bracket has a corresponding closing bracket and they are in the correct order. Your task is to implement the function `is_balanced(s: str) -> bool` that returns `True` if the string is balanced and `False` otherwise.
Input:
- A single string containing only the characters '(', ')', '{', '}', '[' and ']'.
Output:
- Return `True` or `False` based on the balance status of the input string.
Example:
Input:
(({}[]))
Output:
True
Key concepts
stackstringvalidation
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