Algorithm · Figma · Hard
A string s can include parentheses, commas, and lowercase English letters. The parentheses are well-formed when all of the following are true: Each ( is paired with a corresponding ). Each ) corresponds to an earlier (. Parentheses are nested in the proper order; in particular, no prefix of the string contains more closing parentheses than opening parentheses. Return true when the parentheses in s are well-formed. Otherwise, return false. Constraints: The length of s is…
Checking your access…