Search⌘ K
AI Features

Longest Valid Parentheses

Longest Valid Parentheses asks you to find the length of the longest contiguous substring whose opening and closing parentheses are balanced and correctly nested.

Statement

You are given a string composed entirely of ‘(’ and ‘) ...