Maximum Nesting Depth Of Two Valid Parentheses Strings, is a LeetCode problem. In this post we will see how we can solve this challenge in C++

Problem Description

It is the empty string, or

depth("") = 0

Example 1:

Input: seq = "(()())" Output: [0,1,1,1,1,0]

Example 2:

Input: seq = "()(())()" Output: [0,0,0,1,1,0,1,1]


1 <= seq.size <= 10000


You can find the full details of the problem Maximum Nesting Depth of Two Valid Parentheses Strings at LeetCode

Solution: Please check the main.cpp snippet for the solution.

This solution originally posted at: Github by @kamyu104