Coding
Calculate the minimum number of parentheses to add to make a string valid.
A parentheses string is valid if and only if it is empty, or properly balanced. Return the minimum number of parentheses you must add to make the resulting string valid.
Input: s = "((("
Output: 3
Explanation: There are three open parentheses without any matching closing parentheses, so 3 closing parentheses must be added.
Was asked at