Ctrl K
Problem

Bracket Balance

Easy · Bracket Balance

You get a string `brackets` made up only of three kinds of brackets: round `()`, square `[]` and curly `{}`. Check whether the brackets are well formed. That means every opening bracket is matched by a later closing bracket of the same kind, every closing bracket is matched by an earlier opening one, and the pairs nest properly: a bracket opened later must be closed earlier. Return `True` if the string is well formed and `False` otherwise.…

Solve the problem →