Microsoft interview question

Valid Parentheses with extra chars