Algorithm to find lenth of longest sequence of blanks in a given string

Posted by Venki on Stack Overflow See other posts from Stack Overflow or by Venki
Published on 2010-04-11T12:08:12Z Indexed on 2010/04/11 12:13 UTC
Read the original article Hit count: 494

Filed under:
|

Looking for an algorithm to find the length of longest sequence of blanks in a given string examining as few characters as possible?

Hint : Your program should become faster as the length of the sequence of blanks increases.

I know the solution which is O(n).. But looking for more optimal solution

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about homework