Valid Parentheses CheckerGiven a string s containing only ‘(‘ , ‘)’ , ‘{‘ , ‘}’ , ‘[‘ , ‘]’, return True if valid: opens must be closed by same type and in correct order. Test Cases Classic stack validation: push opening brackets, on closing bracket check top matches type, otherwise invalid; finally stack must be…