Given a string containing bracket characters, determine if every opening bracket is closed by the same type of bracket.
Examples
Input: s = "()[]{}"
Output: true
Constraints
- 1 <= s.length <= 10,000
- s contains only bracket characters.
Determine whether brackets are closed in the correct order.
Given a string containing bracket characters, determine if every opening bracket is closed by the same type of bracket.
Input: s = "()[]{}"
Output: true
isValid("()[]{}")
isValid("(]")