Given a string s containing only the characters (, ), {, }, [, ], return True if the string is valid.
A string is valid if:
1. Every opening bracket has a matching closing bracket of the same type
2. Brackets are closed in the correct order
This is exactly what your code editor uses to highlight mismatched brackets.