Given a string containing only parentheses, brackets, and braces, return true when every opening symbol is closed by the same type in the correct order.
An empty stack at the end means every opening symbol was matched.
Inputs = "()[]{}"
Outputtrue
Each opening symbol is immediately followed by its matching closing symbol, so all three pairs are valid.
Inputs = "([)]"
Outputfalse
The first closing parenthesis appears while the square bracket is still open. The pairs cross, so the string is invalid.
1 ≤ s.length ≤ 10,000