Algorithm · Oracle · Medium
You are given a string made up only of the characters (, ), [, ], { and }. Decide whether it is well formed: every closing bracket must close an opening bracket of the same kind, and brackets must be closed in the correct nesting order. Return whether the string is valid under these rules. Follow-ups Now the string contains only the characters (, ) and *. Every * is a wildcard that can be treated as an opening parenthesis, as a closing parenthesis, or as nothing at all.…