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]|
https://leetcode.com/problems/valid-parentheses but with a different set of characters