Skip to content

Latest commit

 

History

History
65 lines (28 loc) · 981 Bytes

File metadata and controls

65 lines (28 loc) · 981 Bytes

中文文档

Description

Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.

Example 1:

Input: "(()"

Output: 2

Explanation: The longest valid parentheses substring is "()"

Example 2:

Input: ")()())"

Output: 4

Explanation: The longest valid parentheses substring is "()()"

Solutions

Python3

Java

...