Meta interview question

1249. Minimum Remove to Make Valid Parentheses