2. Valid Parentheses
Given a string s containing only bracket characters, determine whether the brackets are valid.
範例 1:
輸入: s = "()" 輸出: true
範例 2:
輸入: s = "([)]" 輸出: false
限制條件:
1 <= s.length <= 10^4
Given a string s containing only bracket characters, determine whether the brackets are valid.
輸入: s = "()" 輸出: true
輸入: s = "([)]" 輸出: false
1 <= s.length <= 10^4