← All problems

Valid Parentheses

easy

Given a string s containing only the characters (, ), {, }, [, ], determine whether every bracket is closed in the correct order.

Example

Input: s = "()[]{}"
Output: true

Input: s = "(]"
Output: false
Loading...