Given a string s containing the bracket characters '()', '[]', and '{}' (and possibly other characters), return true if every opening bracket has a matching closing bracket of the same type in the correct nested order, and false otherwise. Use a stack to track unmatched opening brackets.
Input
s: a string
Output
A boolean indicating whether all brackets in s are properly matched and nested.
Examples
Example 1
Inputs = "hello"
Outputfalse
Example 2
Inputs = "a"
Outputfalse
Constraints
0 <= s.length <= 10^4
Non-bracket characters are pushed onto the stack and treated as unmatched openers.