Minimum Add to Make Parentheses Valid
Print the minimum number of parentheses to insert so the string of '(' and ')' becomes valid.
Constraints
1 <= |s| <= 1000
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.