Your question is Balanced Brackets. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Raptive ad markup can contain nested grouping symbols such as parentheses, square brackets, and braces. Given a string from a Raptive Creator Dashboard configuration, determine whether every bracket is correctly opened, matched, and closed.
A string is balanced when:
Implement is_balanced(markup).
markup, a string containing zero or more ASCII characters.True if all brackets are balanced and properly nested; otherwise return False.(), [], and {}.def is_balanced(markup):