Function ADS::longestBalancedSubstring
Defined in File Parentheses.h
Function Documentation
-
inline std::pair<std::size_t, std::size_t> ADS::longestBalancedSubstring(std::string_view s, char open = '(', char close = ')')
where the leftmost of the longest balanced substrings of s starts and its length, ( 0 , 0 ) if there is none
- Pre:
open != close
- Post:
s[ start .. start + length ) is balanced