7. Valid Parentheses
EasyStack
Given a string containing only ()[]{}, return true if every opening bracket is closed by the same type of bracket in the correct order.
Example 1
Input: s = "()[]{}"
Output: trueExample 2
Input: s = "(]" Output: false
Example 3
Input: s = "([)]" Output: false
Constraints
1 ≤ s.length ≤ 10⁴