Coding Challenge · INTERMEDIATE
Given a string consisting of only the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. A valid parentheses substring is one where every opening parenthesis '(' has a corresponding closing parenthesis ')', and they are correctly nested.