

Given a string s consisting only of the characters '(', ')', '[', ']', '{', and '}', return True if the brackets are valid and False otherwise. A string is valid if every opening bracket is closed by the same type of bracket and the pairs are closed in the correct order.
Example 1:
Input: s = "()[]{}"
Output: True
Explanation: Each opening bracket is matched by the correct closing bracket.
Example 2:
Input: s = "([)]"
Output: False
Explanation: The bracket types cross, so the nesting order is invalid.
1 <= len(s) <= 10^4s[i] is one of '(', ')', '[', ']', '{', '}'Given a string s consisting only of the characters '(', ')', '[', ']', '{', and '}', return True if the brackets are valid and False otherwise. A string is valid if every opening bracket is closed by the same type of bracket and the pairs are closed in the correct order.
Example 1:
Input: s = "()[]{}"
Output: True
Explanation: Each opening bracket is matched by the correct closing bracket.
Example 2:
Input: s = "([)]"
Output: False
Explanation: The bracket types cross, so the nesting order is invalid.
1 <= len(s) <= 10^4s[i] is one of '(', ')', '[', ']', '{', '}'