Write code that would parse an expression that is similar to BASH brace expansion. Best illustrated with an example: the expression "(a,b,cy)n,m" would be parsed into an array of the following strings:
You can assume that the input will always be valid.
Hint: the expression can nest. Therefore, "((a,b)o(m,n)p,b)" parses into:
Originally posted here: https://www.careercup.com/question?id=5717301963784192