Search
⌘K

Leetcode 1111. Maximum Nesting Depth of Two Valid Parentheses Strings

Given a valid parentheses string, assign each character to one of two disjoint valid-parentheses subsequences A and B (output 0/1 per index) so that the maximum nesting depth of A and B is minimized. The core challenge is to distribute matching parentheses to balance nesting levels between the two subsequences.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.