Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether the string is valid (LeetCode 678 - Valid Parenthesis String).
Asked in the Phone Screen stage. AWS EC2 Nitro team phone screening interview.
def check_valid_string(s):
s: a string made up only of '(', ')', and '*'True if the string can be interpreted as a valid parenthesis string, otherwise return False.A '*' may represent '(', ')', or an empty string.
def check_valid_string(s):