int Max1 (int a[], int n)
{
int s = 0;
int r = 0;
int i = 0;
s = a[0];
r = a[0];
for (i = 1; i n; ++i)
{
if (s 0)
{
s += a[i];
}
else
{
s = a[i];
}
if (s r)
Hi Andrey,
On Oct 8, 7:56 pm you wrote:
... Enumerating of the words makes no sense.
Agreed.
... As Vishal suggested a trie looks more realistic. Building the
trie can be done O(m), with m - total characters in keywords.
Identifying whether a document character is part of a keyword
This is a good group discussing programming problems and algorithms to
solve programming problems.
http://groups.google.com/group/programming-challenges
Check it out !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google