Twilio | Validate parentheses with self closing symbols

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2019-07-30Added By Anonymous
Source: Link
Twilio | Validate parentheses with self closing symbols

Validate parentheses, possible values are: [ , ], <, > and self closing pipe | There can be any number of characters in between, we should skip them during analysis.

Invalid combinations:

[abc|cde] ]nn| >< >||< ||| [...|...]|

Valid combinations:

|this is valid| |[also valid]| <||> |[]| |[v<a<l>i>d]|

Please let me know if this problem is worth to be listed among other problems and be the continuation of "validate parethesis" series
Comments