Algorithm · ByteDance · Medium
Requirements You are given a string made up exclusively of (, ), and *. Determine whether it can represent a valid parenthesis string when every * may independently become (, ), or an empty string. As a follow-up, use DFS to expand the wildcard characters and return all distinct concrete valid strings obtainable from the input. You must also create your own test cases and execute them in the editor selected for the interview. Examples Example 1 The input already forms a…
Checking your access…