Implement a function for determining the validity of a string. The string is valid if parentheses are correctly distributed within the string.
Utilisateur anonyme
Most of your answers fail. You only count to make sure the number of left parentheses equals the number of right parentheses. You don't check if they are valid. Example ')()(' would pass your checks when it should fail.