Bloomberg Interview Question

String manipulation. What parenthesis to remove to make the string valid. "(a))" to "(a)" or "))a((" to "a"