Wrong expected result


#1

()))()((())) for this usecase expected result is showing 8 but isnt it should be 10 like eg

()()((())) this is of length 10.


#2

It should be contiguous. Substring word refers to contiguous.