Given a string s consisting only of bracket characters, determine whether it is valid.
A string is valid if:
s contains only '(' and ')'.
s may contain three types of brackets: '()', '[]', '{}'.
s
(string)
true
if
s
is valid, otherwise
false
0 <= |s| <= 2 * 10^5
s = "()"
→
true
s = "(()"
→
false
s = "([{}])"
→
true
s = "([)]"
→
false