Balanced brackets
mediumStrings20 XP
s contains only the characters ()[]{}. Return whether every bracket is closed by the same kind of bracket, in the right order.
Examples
- Input: s = "([]{})"Output: true
- Input: s = "(]"Output: false
- Input: s = "(()"Output: false
Examples use JSON: true/false/null are True/False/None in Python.