added a solution for valid Parentheses