ReverseParentheses - Codefights
I'm having a really tough time solving this problem with JavaScript You are given a string s that consists of English letters, punctuation marks, whitespace characters and brackets. It is guaranteed that the brackets in s form a regular bracket sequence. Your task is to reverse the strings in each pair of matching parenthesis, starting from the innermost one. Example For string "s = a(bc)de" the output should be reverseParentheses(s) = "acbde". Input/Output [time limit] 4000ms (js) [input] string s A string consisting of English letters, punctuation marks, whitespace characters and brackets.