I tried use DP and Stack. Not working. I am using java by the way.
same problem. A all "(" long string get TLE even when I force it to return 0 by checking there are ")" or not
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.