#1614

Maximum Nesting Depth of the Parentheses

newbie · 140 · lc easy +13 · 84.8% accepted · 2,815 likes · top 96%

Description

Given a valid parentheses string s, return the nesting depth, which is the maximum number of open parentheses that are simultaneously unclosed at any point in the string.

Code

1
2
3