Posted on January 7, 2022January 7, 2022 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; } }; By Bill0412 Easy LeetCode