Log in
← All problems

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

Examples use JSON: true/false/null are True/False/None in Python.

Run examples checks the examples above. Submit also runs 5 hidden tests.