CT014

Balanced Sigil Brackets

EasyAcceptance: 0.0%

The temple gates of Codetikki are inscribed with round (), curly {}, and square [] brackets. A gate is sacred only if every bracket is properly matched and nested. Given a string of round, curly, and square opening and closing brackets, return whether the brackets are balanced (well-formed). Output "true" or "false".

Example 1:

Input: ([])[]({})
Output: true

Example 2:

Input: ([)]
Output: false

Constraints:

1 <= len(s) <= 10^4 s contains only ()[]{} characters

Tags:

stack strings
Loading...
Test Cases:No test cases
No test cases available.
Coding Problem Not Found | CodeTikki