Returns the length of the longest possible substring, starting from the first element, which is validly encoded.
the array to be tested
See Implementation
Returns the length of the longest possible substring, starting from the first element, which is validly encoded.