Search⌘ K
AI Features

Maximum Nesting Depth of the Parentheses

Try to solve the Maximum Nesting Depth of the Parentheses problem.

We'll cover the following...

Statement

Given a string s representing a valid parentheses string expression, return the maximum nesting depth of parentheses in s.

The nesting depth at any position is the number of currently open parentheses that have not yet been closed. The answer is the largest such value over the entire string.

Note: It ...