Description


Submission
class Solution {
public:
int maxDepth(string s) {
int ret = 0;
int cur = 0;
for(auto ch: s) {
if(ch == '(') ++cur;
else if(ch == ')') --cur;
ret = max(cur, ret);
}
return ret;
}
};
