Given a string s containing only the characters (, ), {, }, [ and ], return true if the brackets are properly nested and false otherwise. A string is valid if every opening bracket is closed by the same type of bracket and 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 closing order does not match the most recent unmatched opening bracket.
1 <= s.length <= 10^4s consists only of '(', ')', '{', '}', '[', ']'