Medium
Given a parentheses string s, return the minimum number of ( or ) insertions needed to make it valid.
s
(
)
Input: s = "())" Output: 1
Input: s = "(((" Output: 3
Input: s = "()" Output: 0