[algogeeks] Re: NxN matrix of positive and negetive integers?

2007-10-09 Thread Jun
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)

[algogeeks] Re: Google Interview Question: find shortest summary containing all key words

2007-10-09 Thread MartinH
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

[algogeeks] Programming-Challenges

2007-10-09 Thread Ajinkya
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