Separator in String in java
You are given with a string along with delimiter such as ")" ,"(" , "}" ,"{" ,"[" , "]" should be replaced and saved as next element in array. Whereas delimiter is doubled "))" should be replaced with ")" of that respective delimiter.
Input
abc(e))df)
Output:
abc
e)df
Input:
abc(efg)hij{lmn}
Output:
abc
efg
hij
lmn
abc(e))df)
Output:
abc
e)df
Input:
abc(efg)hij{lmn}
Output:
abc
efg
hij
lmn
Comments
Post a Comment