← 返回 amazon 的题目列表Maximum Distance Between Matching Parentheses Indices
类型:online_judge
amazon
Given a string s consisting solely of '(' and ')', find the maximum value of indexes i and j such that 0 <= i < j < n, s[i] == '(' and s[j] == ')'.
Example
Input
()()