律师事务所公司类网站建设案例互联网营销行业前景
1614. 括号的最大嵌套深度
class Solution:def maxDepth(self, s: str) -> int:maxD = 0if not s:return maxDstack = []for char in s:if char=='(':stack.append(char)maxD = max(maxD,len(stack))elif char==')' :stack.pop()return maxD
1614. 括号的最大嵌套深度
class Solution:def maxDepth(self, s: str) -> int:maxD = 0if not s:return maxDstack = []for char in s:if char=='(':stack.append(char)maxD = max(maxD,len(stack))elif char==')' :stack.pop()return maxD