Easy

Quiz

#20 Valid Parentheses

APPROACH

String s contains only '(', ')', '{', '}', '[', and ']'. Return whether the brackets are valid: every opener must be closed by the matching bracket type in correct nesting order, and every closer must correspond to an unmatched opener.

1 of 4
1:00

What is the optimal approach for this problem?